Skip to content

Commit

Permalink
Add TimePickerExampleInternational in the documentation section
Browse files Browse the repository at this point in the history
  • Loading branch information
feit committed Jan 26, 2016
1 parent 9d57710 commit 7644d41
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import TimePicker from 'material-ui/lib/time-picker/time-picker';

const TimePickerInternational = () => (
<div>
<TimePicker
hintText="Custom Wordings"
wordings={{ok: '确定', cancel: '取消'}}
/>
</div>
);

export default TimePickerInternational;
10 changes: 10 additions & 0 deletions docs/src/app/components/pages/components/TimePicker/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ import TimePickerExampleSimple from './ExampleSimple';
import timePickerExampleSimpleCode from '!raw!./ExampleSimple';
import TimePickerExampleComplex from './ExampleComplex';
import timePickerExampleComplexCode from '!raw!./ExampleComplex';
import TimePickerExampleInternational from './ExampleInternational';
import timePickerExampleInternationalCode from '!raw!./ExampleInternational';

const descriptions = {
simple: 'Time Picker supports 12 hour and 24 hour formats. In 12 hour format the AM and PM indicators toggle the ' +
'selected time period.',
controlled: '`TimePicker` can be used as a controlled component.',
localised: 'The buttons can be localised using the `wordings` property.',
};

const TimePickersPage = () => (
Expand All @@ -33,6 +36,13 @@ const TimePickersPage = () => (
>
<TimePickerExampleComplex />
</CodeExample>
<CodeExample
title="Localised example"
description={descriptions.localised}
code={timePickerExampleInternationalCode}
>
<TimePickerExampleInternational />
</CodeExample>
<PropTypeDescription code={timePickerCode} />
</div>
);
Expand Down

0 comments on commit 7644d41

Please sign in to comment.