Skip to content

Commit

Permalink
[Toolbar] Fix the example after removing the deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Feb 5, 2016
1 parent 4206458 commit 4e101af
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 4e101af

Please sign in to comment.