-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0dee01c
commit 04139d0
Showing
15 changed files
with
402 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
docs/src/app/components/pages/components/Checkbox/ExampleSimple.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from 'react'; | ||
import Checkbox from 'material-ui/lib/checkbox'; | ||
import ToggleStar from 'material-ui/lib/svg-icons/toggle/star'; | ||
import ToggleStarBorder from 'material-ui/lib/svg-icons/toggle/star-border'; | ||
|
||
const style = { | ||
container: { | ||
textAlign: 'left', | ||
marginBottom: '16px', | ||
minHeight: '24px', | ||
}, | ||
group: { | ||
width: 300, | ||
}, | ||
}; | ||
|
||
const CheckboxExampleSimple = () => ( | ||
<div style={style.group}> | ||
<div style={style.container}> | ||
<Checkbox | ||
id="checkboxId1" | ||
name="checkboxName1" | ||
value="checkboxValue1" | ||
label="went for a run today"/> | ||
</div> | ||
<div style={style.container}> | ||
<Checkbox | ||
id="checkboxId2" | ||
name="checkboxName2" | ||
value="checkboxValue2" | ||
label="fed the dog" | ||
defaultChecked={true}/> | ||
</div> | ||
<div style={style.container}> | ||
<Checkbox | ||
id="checkboxId3" | ||
name="checkboxName3" | ||
value="checkboxValue3" | ||
label="built a house on the moon" | ||
disabled={true}/> | ||
</div> | ||
<div style={style.container}> | ||
<Checkbox | ||
name="checkboxName4" | ||
value="checkboxValue4" | ||
checkedIcon={<ToggleStar />} | ||
unCheckedIcon={<ToggleStarBorder />} | ||
label="custom icon" /> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default CheckboxExampleSimple; |
21 changes: 21 additions & 0 deletions
21
docs/src/app/components/pages/components/Checkbox/Page.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import CodeExample from '../../../CodeExample'; | ||
import PropTypeDescription from '../../../PropTypeDescription'; | ||
import MarkdownElement from '../../../MarkdownElement'; | ||
|
||
import checkboxReadmeText from './README'; | ||
import checkboxCode from '!raw!material-ui/lib/radio-button'; | ||
import CheckboxExampleSimple from './ExampleSimple'; | ||
import checkboxExampleSimpleCode from '!raw!./ExampleSimple'; | ||
|
||
const CheckboxPage = () => ( | ||
<div> | ||
<MarkdownElement text={checkboxReadmeText} /> | ||
<CodeExample code={checkboxExampleSimpleCode}> | ||
<CheckboxExampleSimple /> | ||
</CodeExample> | ||
<PropTypeDescription code={checkboxCode}/> | ||
</div> | ||
); | ||
|
||
export default CheckboxPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
## Checkbox | ||
A [checkbox](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox) | ||
is used to verify which options you want selected from a group. | ||
### Examples |
39 changes: 39 additions & 0 deletions
39
docs/src/app/components/pages/components/RadioButton/ExampleSimple.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import RadioButton from 'material-ui/lib/radio-button'; | ||
import RadioButtonGroup from 'material-ui/lib/radio-button-group'; | ||
|
||
const style = { | ||
container: { | ||
textAlign: 'left', | ||
marginBottom: '16px', | ||
minHeight: '24px', | ||
}, | ||
group: { | ||
width: 300, | ||
}, | ||
}; | ||
|
||
const RadioButtonExampleSimple = () => ( | ||
<div style={style.group}> | ||
<RadioButtonGroup name="shipSpeed" defaultSelected="not_light"> | ||
<RadioButton | ||
id="radioButtonId1" | ||
value="light" | ||
label="prepare for light speed" | ||
style={{marginBottom: 16}} /> | ||
<RadioButton | ||
id="radioButtonId2" | ||
value="not_light" | ||
label="light speed too slow" | ||
style={{marginBottom: 16}}/> | ||
<RadioButton | ||
id="radioButtonId3" | ||
value="ludicrous" | ||
label="go to ludicrous speed" | ||
style={{marginBottom: 16}} | ||
disabled={true}/> | ||
</RadioButtonGroup> | ||
</div> | ||
); | ||
|
||
export default RadioButtonExampleSimple; |
21 changes: 21 additions & 0 deletions
21
docs/src/app/components/pages/components/RadioButton/Page.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import CodeExample from '../../../CodeExample'; | ||
import PropTypeDescription from '../../../PropTypeDescription'; | ||
import MarkdownElement from '../../../MarkdownElement'; | ||
|
||
import radioButtonReadmeText from './README'; | ||
import radioButtonCode from '!raw!material-ui/lib/radio-button'; | ||
import RadioButtonExampleSimple from './ExampleSimple'; | ||
import radioButtonExampleSimpleCode from '!raw!./ExampleSimple'; | ||
|
||
const RadioButtonPage = () => ( | ||
<div> | ||
<MarkdownElement text={radioButtonReadmeText} /> | ||
<CodeExample code={radioButtonExampleSimpleCode}> | ||
<RadioButtonExampleSimple /> | ||
</CodeExample> | ||
<PropTypeDescription code={radioButtonCode}/> | ||
</div> | ||
); | ||
|
||
export default RadioButtonPage; |
5 changes: 5 additions & 0 deletions
5
docs/src/app/components/pages/components/RadioButton/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Radio Button | ||
[Radio buttons](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-radio-button) | ||
are switches used for selection from multiple options. | ||
|
||
### Examples |
43 changes: 43 additions & 0 deletions
43
docs/src/app/components/pages/components/Toggle/ExampleSimple.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import Toggle from 'material-ui/lib/toggle'; | ||
|
||
const style = { | ||
container: { | ||
textAlign: 'left', | ||
marginBottom: '16px', | ||
minHeight: '24px', | ||
}, | ||
group: { | ||
width: 300, | ||
}, | ||
}; | ||
|
||
const ToggleExampleSimple = () => ( | ||
<div style={style.group}> | ||
<div style={style.container}> | ||
<Toggle | ||
id="toggleId1" | ||
name="toggleName1" | ||
value="toggleValue1" | ||
label="activate thrusters"/> | ||
</div> | ||
<div style={style.container}> | ||
<Toggle | ||
id="toggleId2" | ||
name="toggleName2" | ||
value="toggleValue2" | ||
label="auto-pilot" | ||
defaultToggled={true}/> | ||
</div> | ||
<div style={style.container}> | ||
<Toggle | ||
id="toggleId3" | ||
name="toggleName3" | ||
value="toggleValue3" | ||
label="initiate self-destruct sequence" | ||
disabled={true}/> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default ToggleExampleSimple; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import CodeExample from '../../../CodeExample'; | ||
import PropTypeDescription from '../../../PropTypeDescription'; | ||
import MarkdownElement from '../../../MarkdownElement'; | ||
|
||
import toggleReadmeText from './README'; | ||
import toggleCode from '!raw!material-ui/lib/toggle'; | ||
import ToggleExampleSimple from './ExampleSimple'; | ||
import toggleExampleSimpleCode from '!raw!./ExampleSimple'; | ||
|
||
const TogglePage = () => ( | ||
<div> | ||
<MarkdownElement text={toggleReadmeText} /> | ||
<CodeExample code={toggleExampleSimpleCode}> | ||
<ToggleExampleSimple /> | ||
</CodeExample> | ||
<PropTypeDescription code={toggleCode}/> | ||
</div> | ||
); | ||
|
||
export default TogglePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Toggle | ||
A [toggle switch](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-switch) | ||
is used as an on/off control. Supports checkedLink. | ||
|
||
### Examples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.