1.0.2 • Published 2 years ago

@lena-codes/smartbanner-react v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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!')}
/>
ParameterTypeDescription
srcstringrequired Image source
titlestringrequired First line of text
authorstringrequired Second line of text
descriptionstringrequired Third line of text
buttonTextstringrequired Button text
buttonLinkstringrequired Button link
onClose( ) => voidoptional Function implementing the close button; if not set button is hidden
theme'light' | 'dark'optional Predefined color theme, defaults to 'light' if not set
backgroundstringoptional sets the background css value; overwrites theme value
closeIconColorstringoptional sets the close icon color; overwrites theme value
textColorstringoptional sets the text color; overwrites theme value
titleColorstringoptional sets the title color; overwrites theme value
buttonColorstringoptional 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