Skip to content

Commit

Permalink
Merge pull request #3195 from oliviertassinari/toolbar-fix-remove-dep…
Browse files Browse the repository at this point in the history
…recated-code

[Toolbar] Fix the example after removing the deprecated code
  • Loading branch information
alitaheri committed Feb 5, 2016
2 parents 4206458 + 4e101af commit 37ce0b8
Showing 1 changed file with 44 additions and 32 deletions.
76 changes: 44 additions & 32 deletions docs/src/app/components/pages/components/Toolbar/ExampleSimple.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,48 @@ import ToolbarGroup from 'material-ui/lib/toolbar/toolbar-group';
import ToolbarSeparator from 'material-ui/lib/toolbar/toolbar-separator';
import ToolbarTitle from 'material-ui/lib/toolbar/toolbar-title';

const ToolbarExamplesSimple = () => (
<Toolbar>
<ToolbarGroup firstChild={true} float="left">
<DropDownMenu value={3}>
<MenuItem value={1} primaryText="All Broadcasts" />
<MenuItem value={2} primaryText="All Voice" />
<MenuItem value={3} primaryText="All Text" />
<MenuItem value={4} primaryText="Complete Voice" />
<MenuItem value={5} primaryText="Complete Text" />
<MenuItem value={6} primaryText="Active Voice" />
<MenuItem value={7} primaryText="Active Text" />
</DropDownMenu>
</ToolbarGroup>
<ToolbarGroup float="right">
<ToolbarTitle text="Options" />
<FontIcon className="muidocs-icon-custom-sort" />
<IconMenu
iconButtonElement={
<IconButton touch={true}>
<NavigationExpandMoreIcon />
</IconButton>
}
>
<MenuItem primaryText="Download" />
<MenuItem primaryText="More Info" />
</IconMenu>
<ToolbarSeparator />
<RaisedButton label="Create Broadcast" primary={true} />
</ToolbarGroup>
</Toolbar>
);
export default class ToolbarExamplesSimple extends React.Component {

export default ToolbarExamplesSimple;
constructor(props) {
super(props);
this.state = {
value: 3,
};
}

handleChange = (event, index, value) => this.setState({value});

render() {
return (
<Toolbar>
<ToolbarGroup firstChild={true} float="left">
<DropDownMenu value={this.state.value} onChange={this.handleChange}>
<MenuItem value={1} primaryText="All Broadcasts" />
<MenuItem value={2} primaryText="All Voice" />
<MenuItem value={3} primaryText="All Text" />
<MenuItem value={4} primaryText="Complete Voice" />
<MenuItem value={5} primaryText="Complete Text" />
<MenuItem value={6} primaryText="Active Voice" />
<MenuItem value={7} primaryText="Active Text" />
</DropDownMenu>
</ToolbarGroup>
<ToolbarGroup float="right">
<ToolbarTitle text="Options" />
<FontIcon className="muidocs-icon-custom-sort" />
<IconMenu
iconButtonElement={
<IconButton touch={true}>
<NavigationExpandMoreIcon />
</IconButton>
}
>
<MenuItem primaryText="Download" />
<MenuItem primaryText="More Info" />
</IconMenu>
<ToolbarSeparator />
<RaisedButton label="Create Broadcast" primary={true} />
</ToolbarGroup>
</Toolbar>
);
}
}

0 comments on commit 37ce0b8

Please sign in to comment.