+
+ },
+ {
+ title: 'Error notification',
+ details: 'Error notification description',
+ error: true
+ },
+ {
+ title: 'Warning notification',
+ details: 'Warning notification description',
+ warning: true
+ },
+ {
+ title: 'Example info toast',
+ details: 'Toast notification description',
+ icon:
![](https://cdn.svgporn.com/logos/vim.svg)
,
+ info: true
+ },
+ {
+ title: 'Example success toast',
+ details: 'Toast notification description',
+ icon:
![](https://cdn.svgporn.com/logos/atom.svg)
,
+ success: true
+ }
+ ]}
+ />
+
+ );
+ })
+ .add('With add/remove button', () => {
+ class Demo extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ toasts: []
+ };
+ }
+
+ addToast() {
+ const newToasts = Object.assign([], this.state.toasts);
+ newToasts.push({
+ title: 'Example toast',
+ details: 'Example toast description'
+ });
+ this.setState({toasts: newToasts});
+ return false;
+ }
+
+ removeToast() {
+ const newToasts = Object.assign([], this.state.toasts);
+ newToasts.shift();
+ this.setState({toasts: newToasts});
+ return false;
+ }
+
+ render() {
+ return (
+