@comparaonline/ui-offer-banner
v6.1.0
Published
> This component will render an informative banner for the app
Downloads
39
Maintainers
Keywords
Readme
ui-offer-banner
This component will render an informative banner for the app
Installation
yarn add @comparaonline/ui-offer-banner
##Usage
import Banner from '@comparaonline/ui-offer-banner';
class MyView extends React.Component {
render() {
return (
<Banner>
<Grid container>
<Grid item>
<img src="http://example.com/image.jpg" />
</Grid>
<Grid item>This is the message I want to show you</Grid>
</Grid>
</Banner>
);
}
}
| Prop Name | Description | Default Value | Expected Type Value | Required | | --------- | ------------------------------------------------------ | ----------------- | ------------------- | -------- | | open | boolean flag to tell to component if is open or not | undefined (false) | boolean | false | | onClose | a function that will be invoked when X icon is clicked | undefined | () => void | false | | children | The content to shown into the banner | undefined | ReactNode | false |
## Happy coding :sunglasses: