import * as React from "react"; import { useState } from "react"; import * as ReactDOM from "react-dom" const formatter = new Intl.NumberFormat(undefined, { maximumFractionDigits: 2 }); type HighlightFormProps = { onSubmit(code: string, language: string); } const HighlightForm = ({ onSubmit }: HighlightFormProps) => { const [code, setCode] = useState(""); const [language, setLanguage] = useState(""); const handleReset = () => { setCode(""); setLanguage(""); }; const handleSubmit = () => onSubmit && onSubmit(code, language); return (