Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add time picker to website #1906

Merged
merged 2 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 43 additions & 8 deletions src/pages/components/date-picker/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,16 @@ usage documentation, see the Storybooks for each framework below.
id: 'range-calendar',
label: 'Range with calendar',
},
,
{
id: 'time-picker',
label: 'Time picker',
},
]}>
<ComponentVariant id="default-datepicker" knobs={{
DatePicker: ['light']
<ComponentVariant
id="default-datepicker"
knobs={{
DatePicker: ['light'],
}}
links={{
React:
Expand All @@ -86,8 +93,10 @@ usage documentation, see the Storybooks for each framework below.
/>
</DatePicker>
`}</ComponentVariant>
<ComponentVariant id="single-calendar" knobs={{
DatePicker: ['light']
<ComponentVariant
id="single-calendar"
knobs={{
DatePicker: ['light'],
}}
links={{
React:
Expand All @@ -107,8 +116,10 @@ usage documentation, see the Storybooks for each framework below.
/>
</DatePicker>
`}</ComponentVariant>
<ComponentVariant id="range-calendar" knobs={{
DatePicker: ['light']
<ComponentVariant
id="range-calendar"
knobs={{
DatePicker: ['light'],
}}
links={{
React:
Expand All @@ -134,5 +145,29 @@ usage documentation, see the Storybooks for each framework below.
/>
</DatePicker>
`}</ComponentVariant>

</ComponentDemo>
<ComponentVariant
id="time-picker"
knobs={{
TimePicker: ['light'],
}}
links={{
React:
'https://react.carbondesignsystem.com/?path=/story/timepicker--default',
Angular:
'https://angular.carbondesignsystem.com/?path=/story/components-time-picker--simple',
Vue:
'http://vue.carbondesignsystem.com/?path=/storycomponents-cvdatepicker--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=date-picker',
}}>{`
<TimePicker id="time-picker">
<TimePickerSelect id="time-picker-select-1">
<SelectItem value="AM" text="AM" />
<SelectItem value="PM" text="PM" />
</TimePickerSelect>
<TimePickerSelect id="time-picker-select-2" >
<SelectItem value="Time zone 1" text="Time zone 1" />
<SelectItem value="Time zone 2" text="Time zone 2" />
</TimePickerSelect>
</TimePicker>
`}</ComponentVariant>
</ComponentDemo>
51 changes: 43 additions & 8 deletions src/pages/components/date-picker/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,16 @@ for scheduling tasks.
id: 'range-calendar',
label: 'Range with calendar',
},
,
{
id: 'time-picker',
label: 'Time picker',
},
]}>
<ComponentVariant id="default-datepicker" knobs={{
DatePicker: ['light']
<ComponentVariant
id="default-datepicker"
knobs={{
DatePicker: ['light'],
}}
links={{
React:
Expand All @@ -86,8 +93,10 @@ for scheduling tasks.
/>
</DatePicker>
`}</ComponentVariant>
<ComponentVariant id="single-calendar" knobs={{
DatePicker: ['light']
<ComponentVariant
id="single-calendar"
knobs={{
DatePicker: ['light'],
}}
links={{
React:
Expand All @@ -107,8 +116,10 @@ for scheduling tasks.
/>
</DatePicker>
`}</ComponentVariant>
<ComponentVariant id="range-calendar" knobs={{
DatePicker: ['light']
<ComponentVariant
id="range-calendar"
knobs={{
DatePicker: ['light'],
}}
links={{
React:
Expand All @@ -134,8 +145,32 @@ for scheduling tasks.
/>
</DatePicker>
`}</ComponentVariant>

</ComponentDemo>
<ComponentVariant
id="time-picker"
knobs={{
TimePicker: ['light'],
}}
links={{
React:
'https://react.carbondesignsystem.com/?path=/story/timepicker--default',
Angular:
'https://angular.carbondesignsystem.com/?path=/story/components-time-picker--simple',
Vue:
'http://vue.carbondesignsystem.com/?path=/storycomponents-cvdatepicker--default',
Vanilla: 'https://the-carbon-components.netlify.com/?nav=date-picker',
}}>{`
<TimePicker id="time-picker">
<TimePickerSelect id="time-picker-select-1">
<SelectItem value="AM" text="AM" />
<SelectItem value="PM" text="PM" />
</TimePickerSelect>
<TimePickerSelect id="time-picker-select-2" >
<SelectItem value="Time zone 1" text="Time zone 1" />
<SelectItem value="Time zone 2" text="Time zone 2" />
</TimePickerSelect>
</TimePicker>
`}</ComponentVariant>
</ComponentDemo>

## Formatting

Expand Down