A component to display advertising campaings as a header banner in your apps. Stores behavior locally on localStorage.
yarn add @5rabbits/headerstrip
.yarn add react@^16.0.0 react-dom@^16.0.0
.import Headerstrip from '@5rabbits/headerstrip'
import '@5rabbits/headerstrip/dist/headerstrip.css'
<Headerstrip />
prop | type | default | required | description |
---|---|---|---|---|
id | string | true | Advertising unique id, if not supplied the headerstrip will not render. | |
title | string | 'Placeholder title' |
Headerstrip title, the main message should be here. | |
texts | object | {accept: 'Accept', dismiss: 'Dismiss', remind_me_later: 'Snooze'} |
Texts used in the component action buttons. | |
onAccept | function | Callback when accept button is clicked. | ||
onDismiss | function | Callback when dismiss button is clicked. | ||
onSnooze | function | Callback when snooze button is clicked. |
yarn start
to start building the library in watch mode.stories/index.js
file.yarn lint
and yarn prettify
to do this operations manually before commiting (although you shouldn't need to).