react-a2hs
v1.0.6
Published
Customized Add to home screen button for your PWA
Downloads
7
Readme
react-a2hs
Quickly show an installable button for your React PWA
Install
npm install --save react-a2hs
yarn add react-a2hs
Usage
import { A2HSProvider } from 'react-a2hs'
const App = () => (
<A2HSProvider
title={title}
position={position}
{...props}
>
{children}
</A2HSProvider>
)
Props
| name | type | default | info | |-----------------------|---------|-------------|-----------------------------------------------------------------| | title | string | | | | titleSize | string | h2 | Options: h1, h2, h3, h4, h5, h6 | | titleColor | string | black | | | text | string | | | | textSize | int | 14 | Size in px | | textColor | string | black | | | position | string | bottom-left | Options: bottom_left, bottom_right, top_left, top_right | | icon | string | | List of icons: https://react.semantic-ui.com/elements/icon/ | | iconSize | string | big | Options: mini, tiny, small, large, big, huge, massive | | iconColor | string | black | | | buttonText | string | Yes | | | buttonTextColor | string | black | | | buttonBackgroundColor | string | white | | | forceShow | boolean | false | Use in development mode to display button without prerequisites |
License
MIT © maximegouin