Components
Home
Toast
Name
@happeouikit/toast
Latest
1.1.10
License
MIT
Installation
yarn add @happeouikit/toast
Links
Dependencies (7)
@happeouikit/banners@^1.1.4
@happeouikit/buttons@^2.0.3
@happeouikit/colors@^1.0.4
@happeouikit/icons@^2.1.13
@happeouikit/theme@^1.0.4
@happeouikit/typography@^1.0.7
react-transition-group@^4.3.0
Usage
Place the <ToastContainer/>
in the app so it is always available. For example in the same stack as the top most <Router/>
.
Make sure there is only one ToastContainer in the app!
Wherever you need to show a toast message, use the toast
to trigger message.
The following toast parameters are supported
- state: any of the predifined types "active", "success", "warn", "error",
- title
- description
- actionLabel: Show action button with label given
- actionHandler: Define button callback function
- position: override default position with value "right", "center" or "left"
- hideClose: Don't show close (x) button
ToastContainer
delay
number
5000
position
enum
TOAST_POSITION.LEFT