11import React from 'react' ;
22import {
3- withKnobs , text , radios , boolean ,
3+ withKnobs , text , select , boolean ,
44} from '@storybook/addon-knobs' ;
55
66import Card , { CardSizes } from 'src/Card' ;
@@ -19,15 +19,49 @@ export default {
1919
2020export const Default = ( ) => (
2121 < Card
22- divided = { boolean ( 'With divider ' , false ) }
23- helperText = { text ( 'Helper text ' , '(helper text)' ) }
24- noPadding = { boolean ( 'Without padding ' , false ) }
25- size = { radios ( 'Message Type ', CardSizes , CardSizes . LARGE ) }
26- subTitle = { text ( 'Subtitle ' , 'And a subtitle ' ) }
27- title = { text ( 'Title ' , 'Large card with title' ) }
22+ divided = { boolean ( 'divided ' , false ) }
23+ helperText = { text ( 'helperText ' , '(helper text)' ) }
24+ noPadding = { boolean ( 'noPadding ' , false ) }
25+ size = { select ( 'size ', CardSizes , undefined ) }
26+ subTitle = { text ( 'subTitle ' , 'Subtitle ' ) }
27+ title = { text ( 'title ' , 'Default card title' ) }
2828 >
2929 < div >
3030 Use knobs to try out the different card sizes
3131 </ div >
3232 </ Card >
3333) ;
34+
35+ export const Sizes = ( ) => (
36+ < >
37+ < Card
38+ size = { CardSizes . EXTRA_SMALL }
39+ title = "xs"
40+ >
41+ < code > CardSizes.EXTRA_SMALL</ code >
42+ </ Card >
43+ < Card
44+ size = { CardSizes . SMALL }
45+ title = "sm"
46+ >
47+ < code > CardSizes.SMALL</ code >
48+ </ Card >
49+ < Card
50+ size = { CardSizes . MEDIUM }
51+ title = "md"
52+ >
53+ < code > CardSizes.MEDIUM</ code >
54+ </ Card >
55+ < Card
56+ size = { CardSizes . LARGE }
57+ title = "lg"
58+ >
59+ < code > CardSizes.LARGE</ code >
60+ </ Card >
61+ < Card
62+ title = "default"
63+ >
64+ When no size is given, the Card takes up the full width of its parent container.
65+ </ Card >
66+ </ >
67+ ) ;
0 commit comments