Use React Context API
This commit is contained in:
parent
3b78a4d8ad
commit
df237ef336
7 changed files with 90 additions and 72 deletions
|
|
@ -8,7 +8,7 @@ import IconButton from "@material-ui/core/IconButton";
|
|||
import AppBar from "@material-ui/core/AppBar";
|
||||
import Toolbar from "@material-ui/core/Toolbar";
|
||||
import List from "@material-ui/core/List";
|
||||
import { renderIcon } from "config/icon";
|
||||
import { renderRawIcon } from "config/icon";
|
||||
|
||||
import type { RawIcon } from "config/icon";
|
||||
import type { Control } from "config/flowtypes";
|
||||
|
|
@ -57,7 +57,7 @@ class SideBar extends React.PureComponent<Props, SideBarState> {
|
|||
<AppBar position="static">
|
||||
<Toolbar>
|
||||
<span>{this.props.icon == null
|
||||
|| renderIcon(this.props.icon, "mdi-36px")}</span>
|
||||
|| renderRawIcon(this.props.icon, "mdi-36px")}</span>
|
||||
<Typography variant="title" className={this.props.classes.flex}>
|
||||
{this.props.control == null ? "" : this.props.control.name}
|
||||
</Typography>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue