-
-
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
346195a
commit ba5013b
Showing
14 changed files
with
229 additions
and
158 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
41 changes: 41 additions & 0 deletions
41
docs/src/app/components/pages/components/CircularProgress/ExampleDeterminate.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,41 @@ | ||
import React from 'react'; | ||
import CircularProgress from 'material-ui/lib/circular-progress'; | ||
|
||
export default class CircularProgressExampleDeterminate extends React.Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
|
||
this.state = { | ||
completed: 0, | ||
}; | ||
} | ||
|
||
componentDidMount() { | ||
this.timer = setTimeout(() => this.progress(5), 1000); | ||
} | ||
|
||
componentWillUnmount() { | ||
clearTimeout(this.timer); | ||
} | ||
|
||
progress(completed) { | ||
if (completed > 100) { | ||
this.setState({completed: 100}); | ||
} else { | ||
this.setState({completed}); | ||
const diff = Math.random() * 10; | ||
this.timer = setTimeout(() => this.progress(completed + diff), 1000); | ||
} | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<CircularProgress mode="determinate" value={this.state.completed}/> | ||
<CircularProgress mode="determinate" value={this.state.completed} size={1.5}/> | ||
<CircularProgress mode="determinate" value={this.state.completed} size={2}/> | ||
</div> | ||
); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
docs/src/app/components/pages/components/CircularProgress/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 CircularProgress from 'material-ui/lib/circular-progress'; | ||
|
||
const CircularProgressExampleSimple = () => ( | ||
<div> | ||
<CircularProgress mode="indeterminate" /> | ||
<CircularProgress mode="indeterminate" size={1.5}/> | ||
<CircularProgress mode="indeterminate" size={2}/> | ||
</div> | ||
); | ||
|
||
export default CircularProgressExampleSimple; |
26 changes: 26 additions & 0 deletions
26
docs/src/app/components/pages/components/CircularProgress/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 circleProgressReadmeText from './README'; | ||
import circleProgressCode from '!raw!material-ui/lib/circular-progress'; | ||
import CircleProgressExampleSimple from './ExampleSimple'; | ||
import circleProgressExampleSimpleCode from '!raw!./ExampleSimple'; | ||
import CircleProgressExampleDeterminate from './ExampleDeterminate'; | ||
import circleProgressExampleDeterminateCode from '!raw!./ExampleDeterminate'; | ||
|
||
const CircleProgressPage = () => ( | ||
<div> | ||
<MarkdownElement text={circleProgressReadmeText} /> | ||
<CodeExample code={circleProgressExampleSimpleCode}> | ||
<CircleProgressExampleSimple /> | ||
</CodeExample> | ||
<CodeExample code={circleProgressExampleDeterminateCode}> | ||
<CircleProgressExampleDeterminate /> | ||
</CodeExample> | ||
<PropTypeDescription code={circleProgressCode}/> | ||
</div> | ||
); | ||
|
||
export default CircleProgressPage; |
5 changes: 5 additions & 0 deletions
5
docs/src/app/components/pages/components/CircularProgress/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 @@ | ||
## Circular Progress | ||
[Circular Progress](https://www.google.com/design/spec/components/progress-activity.html#progress-activity-types-of-indicators) | ||
will rotate to show the progress of a task or that there is a wait for a task to complete. | ||
|
||
### Examples |
37 changes: 37 additions & 0 deletions
37
docs/src/app/components/pages/components/LinearProgress/ExampleDeterminate.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,37 @@ | ||
import React from 'react'; | ||
import LinearProgress from 'material-ui/lib/linear-progress'; | ||
|
||
export default class LinearProgressExampleDeterminate extends React.Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
|
||
this.state = { | ||
completed: 0, | ||
}; | ||
} | ||
|
||
componentDidMount() { | ||
this.timer = setTimeout(() => this.progress(5), 1000); | ||
} | ||
|
||
componentWillUnmount() { | ||
clearTimeout(this.timer); | ||
} | ||
|
||
progress(completed) { | ||
if (completed > 100) { | ||
this.setState({completed: 100}); | ||
} else { | ||
this.setState({completed}); | ||
const diff = Math.random() * 10; | ||
this.timer = setTimeout(() => this.progress(completed + diff), 1000); | ||
} | ||
} | ||
|
||
render() { | ||
return ( | ||
<LinearProgress mode="determinate" value={this.state.completed} /> | ||
); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
docs/src/app/components/pages/components/LinearProgress/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,8 @@ | ||
import React from 'react'; | ||
import LinearProgress from 'material-ui/lib/linear-progress'; | ||
|
||
const LinearProgressExampleSimple = () => ( | ||
<LinearProgress mode="indeterminate"/> | ||
); | ||
|
||
export default LinearProgressExampleSimple; |
26 changes: 26 additions & 0 deletions
26
docs/src/app/components/pages/components/LinearProgress/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 linearProgressReadmeText from './README'; | ||
import linearProgressCode from '!raw!material-ui/lib/linear-progress'; | ||
import LinearProgressExampleSimple from './ExampleSimple'; | ||
import linearProgressExampleSimpleCode from '!raw!./ExampleSimple'; | ||
import LinearProgressExampleDeterminate from './ExampleDeterminate'; | ||
import linearProgressExampleDeterminateCode from '!raw!./ExampleDeterminate'; | ||
|
||
const LinearProgressPage = () => ( | ||
<div> | ||
<MarkdownElement text={linearProgressReadmeText} /> | ||
<CodeExample code={linearProgressExampleSimpleCode}> | ||
<LinearProgressExampleSimple /> | ||
</CodeExample> | ||
<CodeExample code={linearProgressExampleDeterminateCode}> | ||
<LinearProgressExampleDeterminate /> | ||
</CodeExample> | ||
<PropTypeDescription code={linearProgressCode}/> | ||
</div> | ||
); | ||
|
||
export default LinearProgressPage; |
6 changes: 6 additions & 0 deletions
6
docs/src/app/components/pages/components/LinearProgress/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,6 @@ | ||
## Linear Progress | ||
[Linear Progress](https://www.google.com/design/spec/components/progress-activity.html#progress-activity-types-of-indicators) | ||
bars fill from 0% to 100% to show the progress of a task. It also will animate to | ||
show there is a task waiting to be done. | ||
|
||
### Examples |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.