diff --git a/src/components/forms/DatePicker/DatePicker.stories.tsx b/src/components/forms/DatePicker/DatePicker.stories.tsx index ec774f4854..59f67e926c 100644 --- a/src/components/forms/DatePicker/DatePicker.stories.tsx +++ b/src/components/forms/DatePicker/DatePicker.stories.tsx @@ -7,11 +7,23 @@ import { FormGroup } from '../FormGroup/FormGroup' import { Label } from '../Label/Label' import { TextInput } from '../TextInput/TextInput' import { ValidationStatus } from '../../../types/validationStatus' +import { + DEFAULT_EXTERNAL_DATE_FORMAT, + DateFormat, + INTERNAL_DATE_FORMAT, +} from './constants' export default { title: 'Components/Date picker', component: DatePicker, argTypes: { + dateFormat: { + control: 'radio', + options: [ + DEFAULT_EXTERNAL_DATE_FORMAT as DateFormat, + INTERNAL_DATE_FORMAT as DateFormat, + ], + }, onSubmit: { action: 'submitted' }, disabled: { control: { type: 'boolean' } }, validationStatus: { @@ -50,6 +62,7 @@ We may find that we want to expose props for custom event handlers or even a ref } type StorybookArguments = { + dateFormat: DateFormat onSubmit: React.FormEventHandler disabled?: boolean validationStatus?: ValidationStatus @@ -66,7 +79,7 @@ export const CompleteDatePicker = { Appointment date
- mm/dd/yyyy + {argTypes.dateFormat ?? DEFAULT_EXTERNAL_DATE_FORMAT}