import { h, Component } from 'preact'; import Toolbar from 'preact-material-components/Toolbar'; import cx from 'classnames'; import style from './style'; export default class Header extends Component { setInputRef = c => { this.input = c; }; handleFiles = () => { let files = this.input.files; if (files.length) { this.props.loadFile(files[0]); } }; upload = () => { // let input = document.createElement('input'); // input.type = 'file'; // // input.multiple = true; // document.body.appendChild(input); // input.addEventListener('change', e => { // }); // input.click(); this.input.click(); }; render({ toggleDrawer, showHeader, showFab }) { return ( file_upload menu ); } }