1.0.0 • Published 6 years ago

@source4society/react-alert-component v1.0.0

Weekly downloads
1
License
AGPL-3.0
Repository
github
Last release
6 years ago

react-alert-component

A simple alert presentation component that changes styles based on props. Works great with react-scepter-alert-decorator.

scepter-logo

airbnb-codestyle

Build Status

codecov

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.