@source4society/react-alert-component
v1.0.0
Published
A simple alert presentation component that changes styles based on props
Downloads
1
Readme
react-alert-component
A simple alert presentation component that changes styles based on props. Works great with react-scepter-alert-decorator.
Installation
npm install @source4society/react-alert-component
or
yarn add @source4society/react-alert-component
accepted props
alertType // String, The type of alert such as info, warning, or error. This will dictate the style
className // Custom class name to be appended to alert. Useful for overidding the default styles.
showIcon // Determines whether or not a span tag with iconClass is rendered
iconClass // The class name for the span tag if the showIcon property is set
The message displayed by the alert is simply wrapped by the alert tag or passed as a child.