Skip to content

Commit 84ea4bc

Browse files
committed
Updated docs
1 parent 4487fd5 commit 84ea4bc

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

docs/src/app/components/pages/components/Slider/ExampleAxis.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import React from 'react';
22
import Slider from 'material-ui/Slider';
33

4+
/**
5+
* The orientation of the slider can be reversed and rotated using the `axis` prop.
6+
*/
47
const SliderExampleAxis = () => (
58
<div style={{display: 'flex', height: 124, flexDirection: 'row', justifyContent: 'space-around'}}>
69
<Slider style={{height: 100}} axis="y" defaultValue={0.5} />

docs/src/app/components/pages/components/Slider/ExampleControlled.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import React from 'react';
22
import Slider from 'material-ui/Slider';
33

4+
/**
5+
* The slider bar can have a set minimum and maximum, and the value can be
6+
* obtained through the value parameter fired on an onChange event.
7+
*/
48
export default class SliderExampleControlled extends React.Component {
59

610
state = {

docs/src/app/components/pages/components/Slider/ExampleSimple.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import React from 'react';
22
import Slider from 'material-ui/Slider';
33

4+
/**
5+
* The `defaultValue` property sets the initial position of the slider. The slider
6+
* appearance changes when not at the starting position.
7+
*/
48
const SliderExampleSimple = () => (
59
<div>
610
<Slider />

docs/src/app/components/pages/components/Slider/ExampleStep.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import React from 'react';
22
import Slider from 'material-ui/Slider';
33

4+
/**
5+
* By default, the slider is continuous. The `step` property causes the slider to move in discrete increments.
6+
*/
47
const SliderExampleStep = () => (
58
<Slider step={0.10} value={.5} />
69
);

docs/src/app/components/pages/components/Slider/Page.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,12 @@ import SliderExampleAxis from './ExampleAxis';
1818
import sliderExampleAxisCode from '!raw!./ExampleAxis';
1919
import sliderCode from '!raw!material-ui/Slider/Slider';
2020

21-
const descriptions = {
22-
simple: 'The `defaultValue` property sets the initial position of the slider. The slider appearance changes when ' +
23-
'not at the starting position.',
24-
stepped: 'By default, the slider is continuous. The `step` property causes the slider to move in discrete ' +
25-
'increments.',
26-
value: 'The slider bar can have a set minimum and maximum, and the value can be ' +
27-
'obtained through the value parameter fired on an onChange event.',
28-
axis: 'The orientation of the slider can be reversed and rotated using the `axis` prop.',
29-
};
30-
3121
const SliderPage = () => (
3222
<div>
3323
<Title render={(previousTitle) => `Slider - ${previousTitle}`} />
3424
<MarkdownElement text={sliderReadmeText} />
3525
<CodeExample
3626
title="Simple examples"
37-
description={descriptions.simple}
3827
code={sliderExampleSimpleCode}
3928
>
4029
<SliderExampleSimple />
@@ -47,22 +36,19 @@ const SliderPage = () => (
4736
</CodeExample>
4837
<CodeExample
4938
title="Stepped example"
50-
description={descriptions.stepped}
5139
code={sliderExampleStepCode}
5240
>
5341
<SliderExampleStep />
5442
</CodeExample>
5543
<CodeExample
5644
title="Controlled Examples"
57-
description={descriptions.value}
5845
code={sliderExampleControlledCode}
5946
>
6047
<SliderExampleControlled />
6148
</CodeExample>
6249

6350
<CodeExample
6451
title="Alternative Axis Examples"
65-
description={descriptions.axis}
6652
code={sliderExampleAxisCode}
6753
>
6854
<SliderExampleAxis />

0 commit comments

Comments
 (0)