-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
79f52be
commit 979240d
Showing
21 changed files
with
514 additions
and
598 deletions.
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
54 changes: 54 additions & 0 deletions
54
docs/src/app/components/pages/components/FlatButton/ExampleComplex.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,54 @@ | ||
import React from 'react'; | ||
import FlatButton from 'material-ui/lib/flat-button'; | ||
import Colors from 'material-ui/lib/styles/colors'; | ||
import FontIcon from 'material-ui/lib/font-icon'; | ||
|
||
const styles = { | ||
buttonLabel: { | ||
padding: '0px 16px 0px 8px', | ||
}, | ||
exampleImageInput: { | ||
cursor: 'pointer', | ||
position: 'absolute', | ||
top: '0', | ||
bottom: '0', | ||
right: '0', | ||
left: '0', | ||
width: '100%', | ||
opacity: '0', | ||
}, | ||
exampleFlatButtonIcon: { | ||
height: '100%', | ||
display: 'inline-block', | ||
verticalAlign: 'middle', | ||
paddingLeft: '12px', | ||
lineHeight: '36px', | ||
color: Colors.cyan500, | ||
}, | ||
}; | ||
|
||
const FlatButtonExampleSimple = () => ( | ||
<div> | ||
<FlatButton primary={true} label="Choose an Image"> | ||
<input type="file" id="imageButton" style={styles.exampleImageInput}></input> | ||
</FlatButton> | ||
<FlatButton | ||
linkButton={true} | ||
href="https://github.com/callemall/material-ui" | ||
secondary={true} | ||
label="GitHub" | ||
labelStyle={styles.buttonLabel}> | ||
<FontIcon style={styles.exampleFlatButtonIcon} className="muidocs-icon-custom-github"/> | ||
</FlatButton> | ||
<FlatButton | ||
secondary={true} | ||
label="Label after" | ||
labelPosition="after" | ||
labelStyle={styles.buttonLabel}> | ||
<FontIcon style={styles.exampleFlatButtonIcon} className="muidocs-icon-custom-github"/> | ||
</FlatButton> | ||
<FlatButton label="Disabled" disabled={true} /> | ||
</div> | ||
); | ||
|
||
export default FlatButtonExampleSimple; |
12 changes: 12 additions & 0 deletions
12
docs/src/app/components/pages/components/FlatButton/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,12 @@ | ||
import React from 'react'; | ||
import FlatButton from 'material-ui/lib/flat-button'; | ||
|
||
const FlatButtonExampleSimple = () => ( | ||
<div> | ||
<FlatButton label="Default" /> | ||
<FlatButton label="Primary" primary={true} /> | ||
<FlatButton label="Secondary" secondary={true} /> | ||
</div> | ||
); | ||
|
||
export default FlatButtonExampleSimple; |
26 changes: 26 additions & 0 deletions
26
docs/src/app/components/pages/components/FlatButton/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,26 @@ | ||
import React from 'react'; | ||
import CodeExample from '../../../CodeExample'; | ||
import PropTypeDescription from '../../../PropTypeDescription'; | ||
import MarkdownElement from '../../../MarkdownElement'; | ||
|
||
import flatButtonCode from '!raw!material-ui/lib/flat-button'; | ||
import flatButtonReadmeText from './README'; | ||
import flatButtonExampleSimpleCode from '!raw!./ExampleSimple'; | ||
import FlatButtonExampleSimple from './ExampleSimple'; | ||
import flatButtonExampleComplexCode from '!raw!./ExampleComplex'; | ||
import FlatButtonExampleComplex from './ExampleComplex'; | ||
|
||
const FlatButtonPage = () => ( | ||
<div> | ||
<MarkdownElement text={flatButtonReadmeText}/> | ||
<CodeExample code={flatButtonExampleSimpleCode}> | ||
<FlatButtonExampleSimple /> | ||
</CodeExample> | ||
<CodeExample code={flatButtonExampleComplexCode}> | ||
<FlatButtonExampleComplex /> | ||
</CodeExample> | ||
<PropTypeDescription code={flatButtonCode}/> | ||
</div> | ||
); | ||
|
||
export default FlatButtonPage; |
5 changes: 5 additions & 0 deletions
5
docs/src/app/components/pages/components/FlatButton/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 @@ | ||
## Flat Button | ||
[Flat Buttons](https://www.google.com/design/spec/components/buttons.html#buttons-flat-raised-buttons) | ||
are used for general functions and reduce the amount of layering on the screen, making it more readable. | ||
|
||
### Examples |
25 changes: 25 additions & 0 deletions
25
docs/src/app/components/pages/components/FloatingActionButton/ExampleComplex.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,25 @@ | ||
import React from 'react'; | ||
import FloatingActionButton from 'material-ui/lib/floating-action-button'; | ||
import ToggleStar from 'material-ui/lib/svg-icons/toggle/star'; | ||
import Colors from 'material-ui/lib/styles/colors'; | ||
|
||
const FloatingButtonExampleComplex = () => ( | ||
<div> | ||
<FloatingActionButton | ||
iconClassName="muidocs-icon-action-grade" | ||
secondary={true} /> | ||
<FloatingActionButton mini={true} secondary={true}> | ||
<ToggleStar /> | ||
</FloatingActionButton> | ||
<FloatingActionButton | ||
iconClassName="muidocs-icon-action-grade" | ||
disabled={true} | ||
disabledColor={Colors.grey300} /> | ||
<FloatingActionButton | ||
iconClassName="muidocs-icon-action-grade" | ||
mini={true} | ||
disabled={true} | ||
disabledColor={Colors.grey300} /> | ||
</div> | ||
); | ||
export default FloatingButtonExampleComplex; |
14 changes: 14 additions & 0 deletions
14
docs/src/app/components/pages/components/FloatingActionButton/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,14 @@ | ||
import React from 'react'; | ||
import FloatingActionButton from 'material-ui/lib/floating-action-button'; | ||
import ToggleStar from 'material-ui/lib/svg-icons/toggle/star'; | ||
|
||
const FloatingActionButtonExampleSimple = () => ( | ||
<div> | ||
<FloatingActionButton> | ||
<ToggleStar /> | ||
</FloatingActionButton> | ||
<FloatingActionButton iconClassName="muidocs-icon-action-grade" mini={true} /> | ||
</div> | ||
); | ||
|
||
export default FloatingActionButtonExampleSimple; |
26 changes: 26 additions & 0 deletions
26
docs/src/app/components/pages/components/FloatingActionButton/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,26 @@ | ||
import React from 'react'; | ||
import CodeExample from '../../../CodeExample'; | ||
import PropTypeDescription from '../../../PropTypeDescription'; | ||
import MarkdownElement from '../../../MarkdownElement'; | ||
|
||
import floatingButtonCode from '!raw!material-ui/lib/floating-action-button'; | ||
import floatingButtonReadmeText from './README'; | ||
import floatingButtonExampleSimpleCode from '!raw!./ExampleSimple'; | ||
import FloatingButtonExampleSimple from './ExampleSimple'; | ||
import floatingButtonExampleComplexCode from '!raw!./ExampleComplex'; | ||
import FloatingButtonExampleComplex from './ExampleComplex'; | ||
|
||
const FloatingActionButtonPage = () => ( | ||
<div> | ||
<MarkdownElement text={floatingButtonReadmeText}/> | ||
<CodeExample code={floatingButtonExampleSimpleCode}> | ||
<FloatingButtonExampleSimple /> | ||
</CodeExample> | ||
<CodeExample code={floatingButtonExampleComplexCode}> | ||
<FloatingButtonExampleComplex /> | ||
</CodeExample> | ||
<PropTypeDescription code={floatingButtonCode}/> | ||
</div> | ||
); | ||
|
||
export default FloatingActionButtonPage; |
5 changes: 5 additions & 0 deletions
5
docs/src/app/components/pages/components/FloatingActionButton/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 @@ | ||
## Floating Action Button | ||
The [Floating Action Button](https://www.google.com/design/spec/components/buttons-floating-action-button.html) | ||
is used for frequently used functions. | ||
|
||
### Examples |
60 changes: 60 additions & 0 deletions
60
docs/src/app/components/pages/components/RaisedButton/ExampleComplex.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,60 @@ | ||
import React from 'react'; | ||
import RaisedButton from 'material-ui/lib/raised-button'; | ||
import Colors from 'material-ui/lib/styles/colors'; | ||
import FontIcon from 'material-ui/lib/font-icon'; | ||
import Typography from 'material-ui/lib/styles/typography'; | ||
|
||
const styles = { | ||
buttonLabel: { | ||
padding: '0px 16px 0px 8px', | ||
}, | ||
exampleImageInput: { | ||
cursor: 'pointer', | ||
position: 'absolute', | ||
top: '0', | ||
bottom: '0', | ||
right: '0', | ||
left: '0', | ||
width: '100%', | ||
opacity: '0', | ||
}, | ||
exampleButtonIcon: { | ||
color: Typography.textFullWhite, | ||
height: '100%', | ||
display: 'inline-block', | ||
verticalAlign: 'middle', | ||
paddingLeft: '12px', | ||
lineHeight: '36px', | ||
}, | ||
button: { | ||
margin: 12, | ||
}, | ||
}; | ||
|
||
const RaisedButtonExampleComplex = () => ( | ||
<div> | ||
<RaisedButton primary={true} label="Choose an Image" style={styles.button}> | ||
<input type="file" style={styles.exampleImageInput}></input> | ||
</RaisedButton> | ||
<RaisedButton | ||
linkButton={true} | ||
href="https://github.com/callemall/material-ui" | ||
secondary={true} | ||
style={styles.button} | ||
label="Github" | ||
labelStyle={styles.buttonLabel}> | ||
<FontIcon style={styles.exampleButtonIcon} className="muidocs-icon-custom-github"/> | ||
</RaisedButton> | ||
<RaisedButton | ||
secondary={true} | ||
label="Label after" | ||
labelPosition="after" | ||
labelStyle={styles.buttonLabel} | ||
style={styles.button}> | ||
<FontIcon style={styles.exampleButtonIcon} className="muidocs-icon-custom-github"/> | ||
</RaisedButton> | ||
<RaisedButton label="Disabled" disabled={true} style={styles.button}/> | ||
</div> | ||
); | ||
|
||
export default RaisedButtonExampleComplex; |
16 changes: 16 additions & 0 deletions
16
docs/src/app/components/pages/components/RaisedButton/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,16 @@ | ||
import React from 'react'; | ||
import RaisedButton from 'material-ui/lib/raised-button'; | ||
|
||
const styles = { | ||
margin: 12, | ||
}; | ||
|
||
const RaisedButtonExampleSimple = () => ( | ||
<div> | ||
<RaisedButton label="Default" style={styles} /> | ||
<RaisedButton label="Primary" primary={true} style={styles} /> | ||
<RaisedButton label="Secondary" secondary={true} style={styles} /> | ||
</div> | ||
); | ||
|
||
export default RaisedButtonExampleSimple; |
26 changes: 26 additions & 0 deletions
26
docs/src/app/components/pages/components/RaisedButton/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,26 @@ | ||
import React from 'react'; | ||
import CodeExample from '../../../CodeExample'; | ||
import PropTypeDescription from '../../../PropTypeDescription'; | ||
import MarkdownElement from '../../../MarkdownElement'; | ||
|
||
import raisedButtonCode from '!raw!material-ui/lib/raised-button'; | ||
import raisedButtonReadmeText from './README'; | ||
import raisedButtonExampleSimpleCode from '!raw!./ExampleSimple'; | ||
import RaisedButtonExampleSimple from './ExampleSimple'; | ||
import RaisedButtonExampleComplexCode from '!raw!./ExampleComplex'; | ||
import RaisedButtonExampleComplex from './ExampleComplex'; | ||
|
||
const FloatingActionButtonPage = () => ( | ||
<div> | ||
<MarkdownElement text={raisedButtonReadmeText}/> | ||
<CodeExample code={raisedButtonExampleSimpleCode}> | ||
<RaisedButtonExampleSimple /> | ||
</CodeExample> | ||
<CodeExample code={RaisedButtonExampleComplexCode}> | ||
<RaisedButtonExampleComplex /> | ||
</CodeExample> | ||
<PropTypeDescription code={raisedButtonCode}/> | ||
</div> | ||
); | ||
|
||
export default FloatingActionButtonPage; |
5 changes: 5 additions & 0 deletions
5
docs/src/app/components/pages/components/RaisedButton/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 @@ | ||
## Raised Button | ||
This [button](https://www.google.com/design/spec/components/buttons.html#buttons-flat-raised-buttons) | ||
is used to add dimension to mostly flat layouts and emphasizes important functions on your page. | ||
|
||
### Examples |
Oops, something went wrong.