Skip to content

Commit d1e47fc

Browse files
committed
Add examples with disabled prop and readOnly to storybook
1 parent 543ccb5 commit d1e47fc

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

stories/DateRangePicker_input.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ storiesOf('DRP - Input Props', module)
4848
initialEndDate={moment().add(3, 'months').add(10, 'days')}
4949
/>
5050
))
51+
.addWithInfo('disabled', () => (
52+
<DateRangePickerWrapper
53+
initialStartDate={moment().add(3, 'months')}
54+
initialEndDate={moment().add(3, 'months').add(10, 'days')}
55+
disabled
56+
/>
57+
))
58+
.addWithInfo('readOnly', () => (
59+
<DateRangePickerWrapper
60+
initialStartDate={moment().add(3, 'months')}
61+
initialEndDate={moment().add(3, 'months').add(10, 'days')}
62+
readOnly
63+
/>
64+
))
5165
.addWithInfo('with clear dates button', () => (
5266
<DateRangePickerWrapper
5367
initialStartDate={moment().add(3, 'days')}

stories/SingleDatePicker_input.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ storiesOf('SDP - Input Props', module)
1010
initialDate={moment().add(3, 'days')}
1111
/>
1212
))
13+
.addWithInfo('disabled', () => (
14+
<SingleDatePickerWrapper
15+
initialDate={moment().add(3, 'days')}
16+
disabled
17+
/>
18+
))
19+
.addWithInfo('readOnly', () => (
20+
<SingleDatePickerWrapper
21+
initialDate={moment().add(3, 'days')}
22+
readOnly
23+
/>
24+
))
1325
.addWithInfo('with clear dates button', () => (
1426
<SingleDatePickerWrapper
1527
initialDate={moment().add(3, 'days')}

0 commit comments

Comments
 (0)