Fix the icon color + allow changing icons depending on the state

This commit is contained in:
uwap 2017-11-11 05:44:04 +01:00
parent 2c433c7df0
commit bcb35877c1
7 changed files with 47 additions and 13 deletions

View file

@ -13,7 +13,8 @@ import { renderIcon } from "utils/parseIconName";
export type SideBarProps = {
control: ?Control,
open: boolean,
onCloseRequest: () => void
onCloseRequest: () => void,
icon?: ?string
};
export type SideBarState = {
@ -49,8 +50,8 @@ class SideBar extends React.Component<SideBarProps & Classes, SideBarState> {
>
<AppBar position="static">
<Toolbar>
{this.props.control == null
|| renderIcon(this.props.control.icon, "mdi-36px")}
{this.props.icon == null
|| renderIcon(this.props.icon, "mdi-36px")}
<Typography type="title" className={this.props.classes.flex}>
{this.props.control == null || this.props.control.name}
</Typography>