import React, { useState } from 'react'; import { Box, Footer, Grommet, Menu } from 'grommet'; import { Editor } from './components/Editor'; import { Preview } from './components/Preview'; import { SAMPLES } from './samples'; import { Resizable } from 're-resizable'; import './App.scss'; import icon from './images/icon.png'; const theme = { global: { font: { family: 'Roboto', }, }, }; function App() { const [jsCode, setJsCode] = useState(''); const [sample, setSample] = useState(SAMPLES[0]); return (
({ label: sample.label, onClick: () => setSample(sample), }))} /> {sample.label}
); } export default App;