mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 10:09:45 +00:00
toggleDrawer() -> onToggleDrawer()
This commit is contained in:
@@ -99,7 +99,7 @@ export default class App extends Component<Props, State> {
|
|||||||
<div id="app" class={style.app}>
|
<div id="app" class={style.app}>
|
||||||
<Fab showing={showFab} />
|
<Fab showing={showFab} />
|
||||||
|
|
||||||
<Header class={style.header} toggleDrawer={this.toggleDrawer} loadFile={this.loadFile} />
|
<Header class={style.header} onToggleDrawer={this.toggleDrawer} loadFile={this.loadFile} />
|
||||||
|
|
||||||
{/* Avoid loading & rendering the drawer until the first time it is shown. */}
|
{/* Avoid loading & rendering the drawer until the first time it is shown. */}
|
||||||
<When value={showDrawer}>
|
<When value={showDrawer}>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { bind } from '../../lib/util';
|
|||||||
type Props = {
|
type Props = {
|
||||||
'class'?: string,
|
'class'?: string,
|
||||||
showHeader?: boolean,
|
showHeader?: boolean,
|
||||||
toggleDrawer?(): void,
|
onToggleDrawer?(): void,
|
||||||
showFab?(): void,
|
showFab?(): void,
|
||||||
loadFile(f: File): void
|
loadFile(f: File): void
|
||||||
};
|
};
|
||||||
@@ -35,7 +35,7 @@ export default class Header extends Component<Props, State> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render({ class: c, toggleDrawer, showHeader = false, showFab }: Props) {
|
render({ class: c, onToggleDrawer, showHeader = false, showFab }: Props) {
|
||||||
return (
|
return (
|
||||||
<Toolbar fixed class={cx(c, style.toolbar, 'inert', !showHeader && style.minimal)}>
|
<Toolbar fixed class={cx(c, style.toolbar, 'inert', !showHeader && style.minimal)}>
|
||||||
<Toolbar.Row>
|
<Toolbar.Row>
|
||||||
@@ -43,7 +43,7 @@ export default class Header extends Component<Props, State> {
|
|||||||
<Toolbar.Icon title="Upload" ripple onClick={this.upload}>file_upload</Toolbar.Icon>
|
<Toolbar.Icon title="Upload" ripple onClick={this.upload}>file_upload</Toolbar.Icon>
|
||||||
</Toolbar.Title>
|
</Toolbar.Title>
|
||||||
<Toolbar.Section align-end>
|
<Toolbar.Section align-end>
|
||||||
<Toolbar.Icon ripple onClick={toggleDrawer}>menu</Toolbar.Icon>
|
<Toolbar.Icon ripple onClick={onToggleDrawer}>menu</Toolbar.Icon>
|
||||||
</Toolbar.Section>
|
</Toolbar.Section>
|
||||||
</Toolbar.Row>
|
</Toolbar.Row>
|
||||||
<input class={style.fileInput} ref={this.setInputRef} type="file" onChange={this.handleFiles} />
|
<input class={style.fileInput} ref={this.setInputRef} type="file" onChange={this.handleFiles} />
|
||||||
|
|||||||
Reference in New Issue
Block a user