Skip to content

Commit

Permalink
migrate docs to adhere to the new naming strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
alitaheri authored and ali taheri committed Dec 22, 2015
1 parent 19fb970 commit 9a4b3a2
Show file tree
Hide file tree
Showing 84 changed files with 380 additions and 403 deletions.
45 changes: 22 additions & 23 deletions docs/src/app/app-routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ import Themes from './components/pages/customization/themes';
import InlineStyles from './components/pages/customization/inline-styles';

import Components from './components/pages/components';
import AppBar from './components/pages/components/app-bar';
import AppBarPage from './components/pages/components/AppBar/Page';
import AutoComplete from './components/pages/components/auto-complete';
import Avatar from './components/pages/components/avatar';
import Badge from './components/pages/components/badge';
import AvatarPage from './components/pages/components/Avatar/Page';
import BadgePage from './components/pages/components/Badge/Page';
import Buttons from './components/pages/components/buttons';
import Cards from './components/pages/components/cards';
import CardsPage from './components/pages/components/Cards/Page';
import DatePicker from './components/pages/components/date-picker';
import Dialog from './components/pages/components/dialog';
import Divider from './components/pages/components/divider';
import DropDownMenu from './components/pages/components/drop-down-menu';
import DialogPage from './components/pages/components/Dialog/Page';
import DividerPage from './components/pages/components/Divider/Page';
import DropDownMenuPage from './components/pages/components/DropDownMenu/Page';
import GridList from './components/pages/components/grid-list';
import Icons from './components/pages/components/icons';
import IconButtons from './components/pages/components/icon-buttons';
import IconMenus from './components/pages/components/icon-menus';
import LeftNav from './components/pages/components/left-nav';
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';
Expand All @@ -43,14 +43,13 @@ import Progress from './components/pages/components/progress';
import RefreshIndicator from './components/pages/components/refresh-indicator';
import SelectFields from './components/pages/components/select-fields';
import Sliders from './components/pages/components/sliders';
import Snackbar from './components/pages/components/snackbar';
import SnackbarPage from './components/pages/components/Snackbar/Page';
import Switches from './components/pages/components/switches';
import Table from './components/pages/components/table';
import Tabs from './components/pages/components/tabs';
import TabsPage from './components/pages/components/Tabs/Page';
import TextFields from './components/pages/components/text-fields';
import TimePicker from './components/pages/components/time-picker';
import Toolbars from './components/pages/components/toolbars';

import ToolbarsPage from './components/pages/components/Toolbars/Page';

/**
* Routes: https://github.com/rackt/react-router/blob/master/docs/api/components/Route.md
Expand Down Expand Up @@ -80,21 +79,21 @@ const AppRoutes = (

<Redirect from="components" to="/components/app-bar" />
<Route path="components" component={Components}>
<Route path="app-bar" component={AppBar} />
<Route path="app-bar" component={AppBarPage} />
<Route path="auto-complete" component={AutoComplete} />
<Route path="avatar" component={Avatar} />
<Route path="badge" component={Badge} />
<Route path="avatar" component={AvatarPage} />
<Route path="badge" component={BadgePage} />
<Route path="buttons" component={Buttons} />
<Route path="cards" component={Cards} />
<Route path="cards" component={CardsPage} />
<Route path="date-picker" component={DatePicker} />
<Route path="dialog" component={Dialog} />
<Route path="divider" component={Divider} />
<Route path="dropdown-menu" component={DropDownMenu} />
<Route path="dialog" component={DialogPage} />
<Route path="divider" component={DividerPage} />
<Route path="dropdown-menu" component={DropDownMenuPage} />
<Route path="grid-list" component={GridList} />
<Route path="icons" component={Icons} />
<Route path="icon-buttons" component={IconButtons} />
<Route path="icon-menus" component={IconMenus} />
<Route path="left-nav" component={LeftNav} />
<Route path="left-nav" component={LeftNavPage} />
<Route path="lists" component={Lists} />
<Route path="menus" component={Menus} />
<Route path="paper" component={Paper} />
Expand All @@ -104,12 +103,12 @@ const AppRoutes = (
<Route path="select-fields" component={SelectFields} />
<Route path="sliders" component={Sliders} />
<Route path="switches" component={Switches} />
<Route path="snackbar" component={Snackbar} />
<Route path="snackbar" component={SnackbarPage} />
<Route path="table" component={Table} />
<Route path="tabs" component={Tabs} />
<Route path="tabs" component={TabsPage} />
<Route path="text-fields" component={TextFields} />
<Route path="time-picker" component={TimePicker} />
<Route path="toolbars" component={Toolbars} />
<Route path="toolbars" component={ToolbarsPage} />
</Route>

<IndexRoute component={Home}/>
Expand Down
41 changes: 0 additions & 41 deletions docs/src/app/components/Card/ExampleWithAvatar.jsx

This file was deleted.

37 changes: 0 additions & 37 deletions docs/src/app/components/Card/ExampleWithoutAvatar.jsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import React from 'react';

import {
ClearFix,
Paper,
Styles,
} from 'material-ui';

const {
Spacing,
Typography,
} = Styles;

import CodeBlock from './code-block';
const ThemeManager = Styles.ThemeManager;
const DefaultRawTheme = Styles.LightRawTheme;
import CodeBlock from './CodeBlock';
import ClearFix from 'material-ui/lib/clearfix';
import Paper from 'material-ui/lib/paper';
import Spacing from 'material-ui/lib/styles/spacing';
import Typography from 'material-ui/lib/styles/typography';
import ThemeManager from 'material-ui/lib/styles/theme-manager';
import DefaultRawTheme from 'material-ui/lib/styles/raw-themes/light-raw-theme';

const CodeExample = React.createClass({

Expand Down
File renamed without changes.
33 changes: 33 additions & 0 deletions docs/src/app/components/pages/components/AppBar/Page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import appBarReadmeText from './README';
import AppBarExampleIcon from './ExampleIcon';
import appBarExampleIconCode from '!raw!./ExampleIcon';
import AppBarExampleIconButton from './ExampleIconButton';
import appBarExampleIconButtonCode from '!raw!./ExampleIconButton';
import AppBarExampleIconMenu from './ExampleIconMenu';
import appBarExampleIconMenuCode from '!raw!./ExampleIconMenu';
import appBarCode from '!raw!material-ui/lib/app-bar';

export default class AppBarPage extends React.Component {

render() {
return (
<div>
<MarkdownElement text={appBarReadmeText} />
<CodeExample code={appBarExampleIconCode}>
<AppBarExampleIcon />
</CodeExample>
<CodeExample code={appBarExampleIconButtonCode}>
<AppBarExampleIconButton />
</CodeExample>
<CodeExample code={appBarExampleIconMenuCode}>
<AppBarExampleIconMenu />
</CodeExample>
<PropTypeDescription code={appBarCode}/>
</div>
);
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import avatarReadmeText from './README';
import AvatarExampleSimple from './ExampleSimple';
import avatarExampleSimpleCode from '!raw!./ExampleSimple';
import avatarCode from '!raw!material-ui/lib/avatar';
import CodeExample from '../../code-example/code-example';
import PropTypeDescription from '../../PropTypeDescription';
import AvatarExampleSimple from '../../Avatar/ExampleSimple';
import avatarExampleSimpleCode from '!raw!../../Avatar/ExampleSimple';
import MarkdownElement from '../../MarkdownElement';
import avatarReadmeText from '../../Avatar/README';

export default class AvatarsPage extends React.Component {
render() {
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions docs/src/app/components/pages/components/Badge/Page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import badgeReadmeText from './README';
import BadgeExampleSimple from './ExampleSimple';
import badgeExampleSimpleCode from '!raw!./ExampleSimple';
import BadgeExampleContent from './ExampleContent';
import badgeExampleContentCode from '!raw!./ExampleContent';
import badgeCode from '!raw!material-ui/lib/badge';

const BadgePage = () => {
return (
<div>
<MarkdownElement text={badgeReadmeText} />
<CodeExample code={badgeExampleSimpleCode}>
<BadgeExampleSimple />
</CodeExample>
<CodeExample code={badgeExampleContentCode}>
<BadgeExampleContent />
</CodeExample>
<PropTypeDescription code={badgeCode}/>
</div>
);
};

export default BadgePage;
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from 'react';
import Avatar from 'material-ui/lib/avatar';
import Card from 'material-ui/lib/card/card';
import CardActions from 'material-ui/lib/card/card-actions';
import CardHeader from 'material-ui/lib/card/card-header';
import CardMedia from 'material-ui/lib/card/card-media';
import CardTitle from 'material-ui/lib/card/card-title';
import FlatButton from 'material-ui/lib/flat-button';
import CardText from 'material-ui/lib/card/card-text';

const CardExampleWithAvatar = () => (
<Card>
<CardHeader
title="Title"
subtitle="Subtitle"
avatar={<Avatar style={{color: 'red'}}>A</Avatar>}/>
<CardHeader
title="Demo Url Based Avatar"
subtitle="Subtitle"
avatar="http://lorempixel.com/100/100/nature/"/>
<CardMedia overlay={<CardTitle title="Title" subtitle="Subtitle"/>}>
<img src="http://lorempixel.com/600/337/nature/"/>
</CardMedia>
<CardTitle title="Title" subtitle="Subtitle"/>
<CardActions>
<FlatButton label="Action1"/>
<FlatButton label="Action2"/>
</CardActions>
<CardText>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec mattis pretium massa. Aliquam erat volutpat. Nulla facilisi.
Donec vulputate interdum sollicitudin. Nunc lacinia auctor quam sed pellentesque.
Aliquam dui mauris, mattis quis lacus id, pellentesque lobortis odio.
</CardText>
</Card>
);

export default CardExampleWithAvatar;
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import React from 'react';
import Card from 'material-ui/lib/card/card';
import CardActions from 'material-ui/lib/card/card-actions';
import CardHeader from 'material-ui/lib/card/card-header';
import FlatButton from 'material-ui/lib/flat-button';
import CardText from 'material-ui/lib/card/card-text';

const CardExampleWithoutAvatar = () => (
<Card initiallyExpanded={true}>
<CardHeader
title="Without Avatar"
subtitle="Subtitle"
actAsExpander={true}
showExpandableButton={true} />
<CardText expandable={true}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec mattis pretium massa. Aliquam erat volutpat. Nulla facilisi.
Donec vulputate interdum sollicitudin. Nunc lacinia auctor quam sed pellentesque.
Aliquam dui mauris, mattis quis lacus id, pellentesque lobortis odio.
</CardText>
<CardActions expandable={true}>
<FlatButton label="Action1"/>
<FlatButton label="Action2"/>
</CardActions>
<CardText expandable={true}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec mattis pretium massa. Aliquam erat volutpat. Nulla facilisi.
Donec vulputate interdum sollicitudin. Nunc lacinia auctor quam sed pellentesque.
Aliquam dui mauris, mattis quis lacus id, pellentesque lobortis odio.
</CardText>
</Card>
);

export default CardExampleWithoutAvatar;
27 changes: 27 additions & 0 deletions docs/src/app/components/pages/components/Cards/Page.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import cardReadmeText from './README';
import cardExampleWithAvatarCode from '!raw!./ExampleWithAvatar';
import CardExampleWithAvatar from './ExampleWithAvatar';
import cardExampleWithoutAvatarCode from '!raw!./ExampleWithoutAvatar';
import CardExampleWithoutAvatar from './ExampleWithoutAvatar';
import cardCode from '!raw!material-ui/lib/card/card';

export default class CardPage extends React.Component {
render() {
return (
<div>
<MarkdownElement text={cardReadmeText} />
<CodeExample code={cardExampleWithAvatarCode}>
<CardExampleWithAvatar />
</CodeExample>
<CodeExample code={cardExampleWithoutAvatarCode}>
<CardExampleWithoutAvatar />
</CodeExample>
<PropTypeDescription code={cardCode} />
</div>
);
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
## Card

A [card](https://www.google.com/design/spec/components/cards.html) is a piece of paper with unique related data that serves as an
entry point to more detailed information. For example, a card could
A [card](https://www.google.com/design/spec/components/cards.html)
is a piece of paper with unique related data that serves as an
entry point to more detailed information. For example, a card could
contain a photo, text, and a link about a single subject.

Cards have a constant width and variable height. The maximum height is
limited to the height of the available space on a platform,
Cards have a constant width and variable height. The maximum height is
limited to the height of the available space on a platform,
but it can temporarily expand (for example, to display a comment field).
Cards do not flip over to reveal information on the back.

Expand Down
Loading

0 comments on commit 9a4b3a2

Please sign in to comment.