-
-
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.
Merge pull request #2799 from Zadielerick/refreshDocsUpdate
[Docs] Update Documentation for Refresh Indicator
- Loading branch information
Showing
8 changed files
with
147 additions
and
143 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
32 changes: 32 additions & 0 deletions
32
docs/src/app/components/pages/components/RefreshIndicator/ExampleLoading.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,32 @@ | ||
import React from 'react'; | ||
import RefreshIndicator from 'material-ui/lib/refresh-indicator'; | ||
|
||
const style = { | ||
container: { | ||
position: 'relative', | ||
}, | ||
refresh: { | ||
display: 'inline-block', | ||
position: 'relative', | ||
}, | ||
}; | ||
|
||
const RefreshIndicatorExampleLoading = () => ( | ||
<div style={style.container}> | ||
<RefreshIndicator | ||
size={40} | ||
left={10} | ||
top={0} | ||
status="loading" | ||
style={style.refresh} /> | ||
<RefreshIndicator | ||
size={40} | ||
left={70} | ||
top={0} | ||
loadingColor={"#FF9800"} | ||
status="loading" | ||
style={style.refresh} /> | ||
</div> | ||
); | ||
|
||
export default RefreshIndicatorExampleLoading; |
48 changes: 48 additions & 0 deletions
48
docs/src/app/components/pages/components/RefreshIndicator/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,48 @@ | ||
import React from 'react'; | ||
import RefreshIndicator from 'material-ui/lib/refresh-indicator'; | ||
|
||
const style = { | ||
container: { | ||
position: 'relative', | ||
}, | ||
refresh: { | ||
display: 'inline-block', | ||
position: 'relative', | ||
}, | ||
}; | ||
|
||
const RefreshIndicatorExampleSimple = () => ( | ||
<div style={style.container}> | ||
<RefreshIndicator | ||
percentage={30} | ||
size={40} | ||
left={10} | ||
top={0} | ||
status="ready" | ||
style={style.refresh} /> | ||
<RefreshIndicator | ||
percentage={60} | ||
size={40} | ||
left={65} | ||
top={0} | ||
status="ready" | ||
style={style.refresh} /> | ||
<RefreshIndicator | ||
percentage={80} | ||
size={40} | ||
left={120} | ||
top={0} | ||
color={"red"} | ||
status="ready" | ||
style={style.refresh} /> | ||
<RefreshIndicator | ||
percentage={100} | ||
size={40} | ||
left={175} | ||
top={0} | ||
status="ready" | ||
style={style.refresh} /> | ||
</div> | ||
); | ||
|
||
export default RefreshIndicatorExampleSimple; |
26 changes: 26 additions & 0 deletions
26
docs/src/app/components/pages/components/RefreshIndicator/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 refreshIndicatorReadmeText from './README'; | ||
import refreshIndicatorCode from '!raw!material-ui/lib/refresh-indicator'; | ||
import RefreshIndicatorExampleSimple from './ExampleSimple'; | ||
import refreshIndicatorExampleSimpleCode from '!raw!./ExampleSimple'; | ||
import RefreshIndicatorExampleLoading from './ExampleLoading'; | ||
import refreshIndicatorExampleLoadingCode from '!raw!./ExampleLoading'; | ||
|
||
const RefreshIndicatorPage = () => ( | ||
<div> | ||
<MarkdownElement text={refreshIndicatorReadmeText} /> | ||
<CodeExample code={refreshIndicatorExampleSimpleCode}> | ||
<RefreshIndicatorExampleSimple /> | ||
</CodeExample> | ||
<CodeExample code={refreshIndicatorExampleLoadingCode}> | ||
<RefreshIndicatorExampleLoading /> | ||
</CodeExample> | ||
<PropTypeDescription code={refreshIndicatorCode}/> | ||
</div> | ||
); | ||
|
||
export default RefreshIndicatorPage; |
6 changes: 6 additions & 0 deletions
6
docs/src/app/components/pages/components/RefreshIndicator/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 @@ | ||
## Refresh Indicator | ||
The [refresh indicator](https://www.google.com/design/spec/components/progress-activity.html#) | ||
is used when showing an item is loading. It is kept hidden from the interface until it's | ||
status prop is changed to `loading` or `ready`. | ||
|
||
### Examples |
132 changes: 0 additions & 132 deletions
132
docs/src/app/components/pages/components/refresh-indicator.jsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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