@lena-codes/smartbanner-react
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

smartbanner-react

React component library implementing the iOS specific smart banner for all platforms

NPM JavaScript Style Guide

Light Theme light theme

Dark Theme dark theme

Install

npm install --save @lena-codes/smartbanner-react

or

yarn add @lena-codes/smartbanner-react

Usage

import { SmartBanner } from '@lena-codes/smartbanner-react'

<SmartBanner
  src='enter-your-icon-here.png'
  title='MyApp'
  author='lena.codes'
  description='GET - On the Play Store'
  buttonLink='https://lena.codes'
  buttonText='View'
  onClose={() => alert('pressed the close button!')}
/>
Parameter Type Description
src string required Image source
title string required First line of text
author string required Second line of text
description string required Third line of text
buttonText string required Button text
buttonLink string required Button link
onClose ( ) => void optional Function implementing the close button; if not set button is hidden
theme 'light' | 'dark' optional Predefined color theme, defaults to 'light' if not set
background string optional sets the background css value; overwrites theme value
closeIconColor string optional sets the close icon color; overwrites theme value
textColor string optional sets the text color; overwrites theme value
titleColor string optional sets the title color; overwrites theme value
buttonColor string optional sets the link button color; overwrites theme value

Check it out

Build the project

npm run build

Run demo locally

npm start

License

MIT © lena-codes

Package Sidebar

Install

npm i @lena-codes/smartbanner-react

Weekly Downloads

9

Version

1.0.2

License

MIT

Unpacked Size

55.5 kB

Total Files

15

Last publish

Collaborators

  • lena-codes