@@ -19,33 +19,46 @@ const TodayButtonExtensionRenderer = (props) => {
1919 ) ;
2020} ;
2121
22+ const datepickerWrapperStyle = {
23+ padding : 8 ,
24+ width : 350 ,
25+ borderRadius : 4 ,
26+ boxShadow : '0 0 4px gray' ,
27+ } ;
28+
2229storiesOf ( 'Datepicker' , module )
2330 . addDecorator ( withKnobs )
2431 . addWithInfo ( 'Controlled with knobs' , 'DateInput controlled with knobs' , ( ) => (
25- < Datepicker
26- selectedDate = { text ( 'selectedDate' ) }
27- minDate = { text ( 'minDate' ) }
28- maxDate = { text ( 'maxDate' ) }
29- onSelect = { action ( 'select' ) }
30- onClose = { action ( 'close' ) }
31- onBlur = { action ( 'blur' ) }
32- />
32+ < div style = { datepickerWrapperStyle } >
33+ < Datepicker
34+ selectedDate = { text ( 'selectedDate' ) }
35+ minDate = { text ( 'minDate' ) }
36+ maxDate = { text ( 'maxDate' ) }
37+ onSelect = { action ( 'select' ) }
38+ onClose = { action ( 'close' ) }
39+ onBlur = { action ( 'blur' ) }
40+ />
41+ </ div >
3342 ) )
3443 . addWithInfo ( 'Default' , 'Default date input control' , ( ) => (
35- < Datepicker
36- selectedDate = '2016-04-13'
37- onSelect = { action ( 'select' ) }
38- onClose = { action ( 'close' ) }
39- onBlur = { action ( 'blur' ) }
40- />
44+ < div style = { datepickerWrapperStyle } >
45+ < Datepicker
46+ selectedDate = '2016-04-13'
47+ onSelect = { action ( 'select' ) }
48+ onClose = { action ( 'close' ) }
49+ onBlur = { action ( 'blur' ) }
50+ />
51+ </ div >
4152 ) )
4253 . addWithInfo ( 'Extension Rendering' , 'Specify extension component in datepicker content' , ( ) => (
43- < Datepicker
44- selectedDate = '2016-04-13'
45- extensionRenderer = { TodayButtonExtensionRenderer }
46- onSelect = { action ( 'select' ) }
47- onClose = { action ( 'close' ) }
48- onBlur = { action ( 'blur' ) }
49- />
54+ < div style = { datepickerWrapperStyle } >
55+ < Datepicker
56+ selectedDate = '2016-04-13'
57+ extensionRenderer = { TodayButtonExtensionRenderer }
58+ onSelect = { action ( 'select' ) }
59+ onClose = { action ( 'close' ) }
60+ onBlur = { action ( 'blur' ) }
61+ />
62+ </ div >
5063 ) )
5164;
0 commit comments