A simple React component to display flash messages
<Toast
type={type}
message={message}
duration={3000}
active={active}
setActive={setActive}
position={position}
/>
Property | Description | Values accepted |
---|---|---|
type | The alert type | error , warning , or success |
message | The message that will be displayed | any string |
duration | The duration that the toast will appear on screen | time in milliseconds |
active | A boolean value that indicates if the toast is showing or not | true or false |
setActive | A function that controls the active attribute state | function |
position | The position the the toast will be appear on screen | bleft , bright , tright , tleft , tcenter , or bcenter |
width | The width of the widget | small , medium , large , or full |
- Node 14 or less
- Npm 6
npm start
npm run build
- See our SECURITY for details