import React from 'react'; import FileReaderInput from 'react-file-reader-input'; import { Button, Text } from 'rebass'; import { Menu, NavItem, Tooltip, Container, Block, Fixed } from 'rebass' import {MdSettings, MdPalette, MdLayers, MdSave, MdFolderOpen} from 'react-icons/lib/md'; import theme from './theme.js'; export class Toolbar extends React.Component { constructor(props) { super(props); this.onUpload = this.onUpload.bind(this); } onUpload(_, files) { const [e, file] = files[0]; const reader = new FileReader(); reader.readAsText(file, "UTF-8"); reader.onload = e => { const style = JSON.parse(e.target.result); this.props.onStyleUpload(style); } reader.onerror = e => console.log(e.target); } render() { return } }