@@ -54,15 +54,24 @@ import { Layer } from '../../Layer';
5454export default {
5555 title : 'Components/TimePicker' ,
5656 component : TimePicker ,
57+ argTypes : {
58+ size : {
59+ options : [ 'sm' , 'md' , 'lg' ] ,
60+ control : { type : 'select' } ,
61+ } ,
62+ } ,
63+ args : {
64+ size : 'md' ,
65+ } ,
5766 subcomponents : {
5867 TimePickerSelect,
5968 SelectItem,
6069 } ,
6170} ;
6271
63- export const Default = ( ) => {
72+ export const Default = ( args ) => {
6473 return (
65- < TimePicker id = "time-picker" labelText = "Select a time" >
74+ < TimePicker id = "time-picker" labelText = "Select a time" { ... args } >
6675 < TimePickerSelect id = "time-picker-select-1" >
6776 < SelectItem value = "AM" text = "AM" />
6877 < SelectItem value = "PM" text = "PM" />
@@ -75,10 +84,10 @@ export const Default = () => {
7584 ) ;
7685} ;
7786
78- export const WithLayer = ( ) => {
87+ export const WithLayer = ( args ) => {
7988 return (
8089 < >
81- < TimePicker id = "time-picker" labelText = "First layer" >
90+ < TimePicker id = "time-picker" labelText = "First layer" { ... args } >
8291 < TimePickerSelect id = "time-picker-select-1" >
8392 < SelectItem value = "AM" text = "AM" />
8493 < SelectItem value = "PM" text = "PM" />
@@ -89,7 +98,7 @@ export const WithLayer = () => {
8998 </ TimePickerSelect >
9099 </ TimePicker >
91100 < Layer >
92- < TimePicker id = "time-picker" labelText = "Second layer" >
101+ < TimePicker id = "time-picker" labelText = "Second layer" { ... args } >
93102 < TimePickerSelect id = "time-picker-select-1" >
94103 < SelectItem value = "AM" text = "AM" />
95104 < SelectItem value = "PM" text = "PM" />
@@ -100,7 +109,7 @@ export const WithLayer = () => {
100109 </ TimePickerSelect >
101110 </ TimePicker >
102111 < Layer >
103- < TimePicker id = "time-picker" labelText = "Third layer" >
112+ < TimePicker id = "time-picker" labelText = "Third layer" { ... args } >
104113 < TimePickerSelect id = "time-picker-select-1" >
105114 < SelectItem value = "AM" text = "AM" />
106115 < SelectItem value = "PM" text = "PM" />
0 commit comments