import React, { useState } from "react"; import ReactDOM from "react-dom"; import _SvgVocabulary from "./svg-vocabulary.json"; import type { SvgSymbolData } from "./vocabulary"; const APP_ID = "app"; const appEl = document.getElementById(APP_ID); const SvgVocabulary: SvgSymbolData[] = _SvgVocabulary; if (!appEl) { throw new Error(`Unable to find #${APP_ID}!`); } type SvgSymbolProps = { data: SvgSymbolData; scale?: number; stroke: string; fill: string; }; const px = (value: number) => `${value}px`; const SvgSymbol: React.FC = (props) => { const d = props.data; const scale = props.scale || 1; return ( ); }; const App: React.FC<{}> = () => { const [stroke, setStroke] = useState("#000000"); const [fill, setFill] = useState("#ffffff"); return ( <>

Mythic Symbolic Vocabulary

setStroke(e.target.value)} id="stroke" />

setFill(e.target.value)} id="fill" />

{SvgVocabulary.map((symbolData) => (

{symbolData.name}

))} ); }; ReactDOM.render(, appEl);