import * as React from "react"; import { css } from "@emotion/react"; import Controls from "./Controls"; import { useFont, useFontControls } from "./hooks"; const Glyphs = ({ dark }) => (
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
!?()[]{}@$#%
); const GET_STYLES_CONTAINER = (dark) => (theme) => css` position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; background-color: ${dark ? theme.system.pitchBlack : theme.system.white}; padding: 14px 32px 28px; `; export default function FontFrame({ cid, url, ...props }) { const { isFontLoading, fontName } = useFont({ url, name: cid }, [cid]); const [currentState, { setLightMode, setDarkMode, toggleSettings }] = useFontControls(); return (
{isFontLoading && (

loading...

)}
); } const Sentence = ({ content, valign, textAlign, fontSize, lineHeight, tracking, dark }) => { const [value, setValue] = React.useState(`

${content}

`); return (
setValue(e.target.innerText)} css={(theme) => css({ display: "flex", flexGrow: 1, flexDirection: "column", width: "100%", marginTop: "12px", overflowY: "scroll", color: dark ? theme.system.white : theme.system.pitchBlack, justifyContent: valign, textAlign, fontSize, lineHeight, letterSpacing: tracking, }) } onKeyDown={(e) => { e.stopPropagation(); }} >
); };