From fa8f559449fbc9cee6d674efdc73168e10abfdd7 Mon Sep 17 00:00:00 2001 From: mbrookes Date: Fri, 15 Jan 2016 18:42:21 +0000 Subject: [PATCH 1/2] [Docs] DatePicker - Add title and description to examples --- .../pages/components/DatePicker/Page.jsx | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/docs/src/app/components/pages/components/DatePicker/Page.jsx b/docs/src/app/components/pages/components/DatePicker/Page.jsx index 1b9605bc312131..f6cb9c11cdd0da 100644 --- a/docs/src/app/components/pages/components/DatePicker/Page.jsx +++ b/docs/src/app/components/pages/components/DatePicker/Page.jsx @@ -16,6 +16,16 @@ import DatePickerExampleInternational from './ExampleInternational'; import datePickerExampleInternationalCode from '!raw!./ExampleInternational'; import datePickerReadmeText from './README'; +const descriptions = { + simple: 'Basic examples showing the default portrait and alternative landscape `DatePicker`.', + inline: 'Inline `DatePicker`\'s are displayed below the input, rather than as a modal dialog. ' + + 'The `AutoOk` example closes when a date is selected.', + ranged: 'This example allows you to set a date range, and to toggle `AutoOk`, and `disableYearSelection`.', + controlled: 'Implements a controlled input, where the value is handled by state in the parent (example) component.', + localised: 'Demonstrates a localised `DatePicker`, in this case in French. ' + + 'Note that the buttons must be localised using the `wordings` property.', +}; + if (!window.Intl) { require('intl'); require('intl/locale-data/jsonp/fr'); @@ -24,19 +34,39 @@ if (!window.Intl) { const DatePickerPage = () => (
- + - + - + - + - + From 373fdcacced54ab2a3e6c5bc17c425f79e7250f0 Mon Sep 17 00:00:00 2001 From: mbrookes Date: Fri, 15 Jan 2016 19:02:53 +0000 Subject: [PATCH 2/2] [Docs] Dialog - Add title and description to examples --- .../pages/components/Dialog/ExampleSimple.jsx | 4 +-- .../pages/components/Dialog/Page.jsx | 29 ++++++++++++++++--- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/docs/src/app/components/pages/components/Dialog/ExampleSimple.jsx b/docs/src/app/components/pages/components/Dialog/ExampleSimple.jsx index 6fb2d3bf337b53..3a8fae36289e3f 100644 --- a/docs/src/app/components/pages/components/Dialog/ExampleSimple.jsx +++ b/docs/src/app/components/pages/components/Dialog/ExampleSimple.jsx @@ -34,14 +34,14 @@ export default class DialogExampleSimple extends React.Component { return (
- + - The actions in this window were passed in as an array of react objects. + The actions in this window were passed in as an array of React objects.
); diff --git a/docs/src/app/components/pages/components/Dialog/Page.jsx b/docs/src/app/components/pages/components/Dialog/Page.jsx index c7f9af3e88be22..f5afe662ba3a1b 100644 --- a/docs/src/app/components/pages/components/Dialog/Page.jsx +++ b/docs/src/app/components/pages/components/Dialog/Page.jsx @@ -12,19 +12,40 @@ import DialogExampleCustomWidth from './ExampleCustomWidth'; import dialogExampleCustomWidthCode from '!raw!./ExampleCustomWidth'; import dialogCode from '!raw!material-ui/lib/dialog'; +const descriptions = { + simple: 'Dialog with action buttons. The actions are passed in as an array of React objects, ' + + 'in this example [FlatButtons](http://localhost:3000/#/components/flat-button). \n\n' + + 'You can also close this dialog by clicking outside the dialog, or with the \'Esc\' key.', + modal: 'A modal dialog can only be closed by selecting one of the actions.', + styled: 'The dialog width has been set to occupy the full width of browser through the `contentStyle` property.', + +}; + const DialogPage = () => (
- + - + - + - +
);