Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

source4societyorg/react-alert-component

Repository files navigation

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.

About

Display an alert and style based on the type of alert

Resources

License

Stars

Watchers

Forks

Packages

No packages published