Skip to content

Commit

Permalink
Update Documentation for Paper
Browse files Browse the repository at this point in the history
  • Loading branch information
Zadielerick committed Jan 5, 2016
1 parent 0ae4d7f commit 9a9f37b
Show file tree
Hide file tree
Showing 9 changed files with 169 additions and 207 deletions.
4 changes: 2 additions & 2 deletions docs/src/app/app-routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import IconMenus from './components/pages/components/icon-menus';
import LeftNavPage from './components/pages/components/LeftNav/Page';
import Lists from './components/pages/components/lists';
import Menus from './components/pages/components/menus';
import Paper from './components/pages/components/paper';
import PaperPage from './components/pages/components/Paper/Page';
import Popover from './components/pages/components/popover';
import Progress from './components/pages/components/progress';
import RefreshIndicator from './components/pages/components/refresh-indicator';
Expand Down Expand Up @@ -97,7 +97,7 @@ const AppRoutes = (
<Route path="left-nav" component={LeftNavPage} />
<Route path="lists" component={Lists} />
<Route path="menus" component={Menus} />
<Route path="paper" component={Paper} />
<Route path="paper" component={PaperPage} />
<Route path="popover" component={Popover} />
<Route path="progress" component={Progress} />
<Route path="refresh-indicator" component={RefreshIndicator} />
Expand Down
37 changes: 37 additions & 0 deletions docs/src/app/components/pages/components/Paper/ExampleCircle.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import Paper from 'material-ui/lib/paper';

const style = {
root: {
height: 100,
width: 100,
marginLeft: 40,
textAlign: 'center',
display: 'inline-block',
},
p: {
lineHeight: '80px',
},
};

const PaperExampleCircle = () => (
<div>
<Paper style={style.root} zDepth={1} circle={true}>
<p style={style.p}>circle=true</p>
</Paper>
<Paper style={style.root} zDepth={2} circle={true}>
<p style={style.p}>circle=true</p>
</Paper>
<Paper style={style.root} zDepth={3} circle={true}>
<p style={style.p}>circle=true</p>
</Paper>
<Paper style={style.root} zDepth={4} circle={true}>
<p style={style.p}>circle=true</p>
</Paper>
<Paper style={style.root} zDepth={5} circle={true}>
<p style={style.p}>circle=true</p>
</Paper>
</div>
);

export default PaperExampleCircle;
37 changes: 37 additions & 0 deletions docs/src/app/components/pages/components/Paper/ExampleRounded.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import Paper from 'material-ui/lib/paper';

const style = {
root: {
height: 100,
width: 100,
marginLeft: 40,
textAlign: 'center',
display: 'inline-block',
},
p: {
lineHeight: '80px',
},
};

const PaperExampleRounded = () => (
<div>
<Paper style={style.root} zDepth={1} rounded={false}>
<p style={style.p}>rounded=false</p>
</Paper>
<Paper style={style.root} zDepth={2} rounded={false}>
<p style={style.p}>rounded=false</p>
</Paper>
<Paper style={style.root} zDepth={3} rounded={false}>
<p style={style.p}>rounded=false</p>
</Paper>
<Paper style={style.root} zDepth={4} rounded={false}>
<p style={style.p}>rounded=false</p>
</Paper>
<Paper style={style.root} zDepth={5} rounded={false}>
<p style={style.p}>rounded=false</p>
</Paper>
</div>
);

export default PaperExampleRounded;
37 changes: 37 additions & 0 deletions docs/src/app/components/pages/components/Paper/ExampleSimple.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import Paper from 'material-ui/lib/paper';

const style = {
root: {
height: 100,
width: 100,
marginLeft: 40,
textAlign: 'center',
display: 'inline-block',
},
p: {
lineHeight: '80px',
},
};

const PaperExampleSimple = () => (
<div>
<Paper style={style.root} zDepth={1}>
<p style={style.p}>zDepth=1</p>
</Paper>
<Paper style={style.root} zDepth={2}>
<p style={style.p}>zDepth=2</p>
</Paper>
<Paper style={style.root} zDepth={3}>
<p style={style.p}>zDepth=3</p>
</Paper>
<Paper style={style.root} zDepth={4}>
<p style={style.p}>zDepth=4</p>
</Paper>
<Paper style={style.root} zDepth={5}>
<p style={style.p}>zDepth=5</p>
</Paper>
</div>
);

export default PaperExampleSimple;
31 changes: 31 additions & 0 deletions docs/src/app/components/pages/components/Paper/Page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';

import paperReadmeText from './README';
import paperCode from '!raw!material-ui/lib/paper';
import PaperExampleSimple from './ExampleSimple';
import paperExampleSimpleCode from '!raw!./ExampleSimple';
import PaperExampleRounded from './ExampleRounded';
import paperExampleRoundedCode from '!raw!./ExampleRounded';
import PaperExampleCircle from './ExampleCircle';
import paperExampleCircleCode from '!raw!./ExampleCircle';

const PaperPage = () => (
<div>
<MarkdownElement text={paperReadmeText} />
<CodeExample code={paperExampleSimpleCode}>
<PaperExampleSimple />
</CodeExample>
<CodeExample code={paperExampleRoundedCode}>
<PaperExampleRounded />
</CodeExample>
<CodeExample code={paperExampleCircleCode}>
<PaperExampleCircle />
</CodeExample>
<PropTypeDescription code={paperCode}/>
</div>
);

export default PaperPage;
5 changes: 5 additions & 0 deletions docs/src/app/components/pages/components/Paper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Paper
A [Paper](https://www.google.com/design/spec/layout/principles.html#principles-how-paper-works)
element is a basic container that can give depth to the page.

### Examples
157 changes: 0 additions & 157 deletions docs/src/app/components/pages/components/paper.jsx

This file was deleted.

48 changes: 0 additions & 48 deletions docs/src/app/components/raw-code/paper-code.txt

This file was deleted.

Loading

0 comments on commit 9a9f37b

Please sign in to comment.