11import React , { Fragment } from 'react' ;
2- import { boolean , text , withKnobs } from '@storybook/addon-knobs' ;
32import { action } from '@storybook/addon-actions' ;
43
54import { Alert , MessageTypes } from 'src/Alert' ;
@@ -14,7 +13,6 @@ import '../../scss/global.scss';
1413export default {
1514 title : 'Components/Alert' ,
1615 component : Alert ,
17- decorators : [ withKnobs ] ,
1816 parameters : {
1917 docs : {
2018 page : mdx ,
@@ -25,49 +23,49 @@ export default {
2523export const Success = ( ) => (
2624 < Alert
2725 id = "1"
28- message = { text ( 'Message' , ' Success message' ) }
29- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
30- title = { text ( 'Title' , ' Success title' ) }
26+ message = " Success message"
27+ removeBorderLeft = { false }
28+ title = " Success title"
3129 type = { MessageTypes . SUCCESS }
3230 />
3331) ;
3432
3533export const Info = ( ) => (
3634 < Alert
3735 id = "2"
38- message = { text ( 'Message' , ' Info message' ) }
39- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
40- title = { text ( 'Title' , ' Info title' ) }
36+ message = " Info message"
37+ removeBorderLeft = { false }
38+ title = " Info title"
4139 type = { MessageTypes . INFO }
4240 />
4341) ;
4442
4543export const Feature = ( ) => (
4644 < Alert
4745 id = "3"
48- message = { text ( 'Message' , ' Some context around new feature if needed.' ) }
49- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
50- title = { text ( 'Title' , ' New feature alert!' ) }
46+ message = " Some context around new feature if needed."
47+ removeBorderLeft = { false }
48+ title = " New feature alert!"
5149 type = { MessageTypes . FEATURE }
5250 />
5351) ;
5452
5553export const Error = ( ) => (
5654 < Alert
5755 id = "4"
58- message = { text ( 'Message' , ' Error message' ) }
59- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
60- title = { text ( 'Title' , ' Error title' ) }
56+ message = " Error message"
57+ removeBorderLeft = { false }
58+ title = " Error title"
6159 type = { MessageTypes . ERROR }
6260 />
6361) ;
6462
6563export const Warning = ( ) => (
6664 < Alert
6765 id = "5"
68- message = { text ( 'Message' , ' Warning message' ) }
69- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
70- title = { text ( 'Title' , ' Warning title' ) }
66+ message = " Warning message"
67+ removeBorderLeft = { false }
68+ title = " Warning title"
7169 type = { MessageTypes . WARNING }
7270 />
7371) ;
@@ -79,9 +77,9 @@ const onDismiss = (id) => {
7977export const WithDismiss = ( ) => (
8078 < Alert
8179 id = "6"
82- message = { text ( 'Message' , ' Default message' ) }
83- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
84- title = { text ( 'Title' , ' Default title' ) }
80+ message = " Default message"
81+ removeBorderLeft = { false }
82+ title = " Default title"
8583 type = { MessageTypes . SUCCESS }
8684 onDismiss = { onDismiss }
8785 />
@@ -114,7 +112,7 @@ export const WithCallToAction = () => (
114112 action = { { content : 'Primary action' , url : 'https://www.userinterviews.com/' } }
115113 id = "8"
116114 message = "Success message"
117- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
115+ removeBorderLeft = { false }
118116 title = "Success title"
119117 type = { MessageTypes . SUCCESS }
120118 onDismiss = { onDismiss }
@@ -123,7 +121,7 @@ export const WithCallToAction = () => (
123121 action = { { content : 'Primary action' , url : 'https://www.userinterviews.com/' } }
124122 id = "9"
125123 message = "Info message"
126- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
124+ removeBorderLeft = { false }
127125 title = "Info title"
128126 type = { MessageTypes . INFO }
129127 onDismiss = { onDismiss }
@@ -132,7 +130,7 @@ export const WithCallToAction = () => (
132130 action = { { content : 'Primary action' , url : 'https://www.userinterviews.com/' } }
133131 id = "11"
134132 message = "Error message"
135- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
133+ removeBorderLeft = { false }
136134 title = "Error title"
137135 type = { MessageTypes . ERROR }
138136 onDismiss = { onDismiss }
@@ -141,7 +139,7 @@ export const WithCallToAction = () => (
141139 action = { { content : 'Primary action' , url : 'https://www.userinterviews.com/' } }
142140 id = "12"
143141 message = "Warning message"
144- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
142+ removeBorderLeft = { false }
145143 title = "Warning title"
146144 type = { MessageTypes . WARNING }
147145 onDismiss = { onDismiss }
@@ -150,7 +148,7 @@ export const WithCallToAction = () => (
150148 action = { { content : 'Primary action' , url : 'https://www.userinterviews.com/' } }
151149 id = "13"
152150 message = "Some context around new feature if needed"
153- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
151+ removeBorderLeft = { false }
154152 title = "New feature alert!"
155153 type = { MessageTypes . FEATURE }
156154 onDismiss = { onDismiss }
@@ -167,8 +165,8 @@ export const WithCallToAction = () => (
167165 < GoogleCalendarButton />
168166 </ Fragment >
169167 ) }
170- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
171- title = { text ( 'Title' , ' Connect to Google Calendar to create reminders automatically' ) }
168+ removeBorderLeft = { false }
169+ title = " Connect to Google Calendar to create reminders automatically"
172170 type = { MessageTypes . ANNOUNCEMENT }
173171 onDismiss = { onDismiss }
174172 />
@@ -177,10 +175,10 @@ export const WithCallToAction = () => (
177175 < Alert
178176 action = { < GoogleCalendarButton /> }
179177 id = "8"
180- message = { text ( 'Message' , `When you confirm a session we’ll automatically
181- add an event and reminders to your Google Calendar.` ) }
182- removeBorderLeft = { boolean ( 'removeBorderLeft' , false ) }
183- title = { text ( 'Title' , ' Connect to Google Calendar to create reminders automatically' ) }
178+ message = { `When you confirm a session we’ll automatically
179+ add an event and reminders to your Google Calendar.` }
180+ removeBorderLeft = { false }
181+ title = " Connect to Google Calendar to create reminders automatically"
184182 type = { MessageTypes . ANNOUNCEMENT }
185183 onDismiss = { onDismiss }
186184 />
0 commit comments