React component library implementing the iOS specific smart banner for all platforms
npm install @lena-codes/smartbanner-react> React component library implementing the iOS specific smart banner for all platforms
 
Light Theme
!light theme
Dark Theme
!dark theme
``bash`
npm install --save @lena-codes/smartbanner-react
or
`bash`
yarn add @lena-codes/smartbanner-react
`tsx
import { SmartBanner } from '@lena-codes/smartbanner-react'
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 |
`bash`
npm run build
`bash``
npm start
MIT © lena-codes