import { TypographyValue, getTypography, } from "@tableberg/shared/utils/typography"; import FontFamilyControl from "./FontFamilyControl"; import FontSizeControl from "./FontSizeControl"; import FontAppearanceControl from "./FontAppearanceControl"; import LineHeightControl from "./LineHeightControl"; import LetterSpacingControl from "./LetterSpacingControl"; import TextDecorationControl from "./TextDecorationControl"; import TextTransformControl from "./TextTransformControl"; interface Props { value?: Partial; onChange: (updates: Partial) => void; panelId?: string; } /** * The whole typography group in one go: the same options the core blocks * offer, as ToolsPanelItems, so a block only has to put them in a ToolsPanel * and store the values. Individual controls are exported too, for a block * that wants just one of them. */ export default function TypographyControls({ value, onChange, panelId, }: Props) { const typography = getTypography(value); return ( <> onChange({ fontFamily })} /> onChange({ fontSize })} /> onChange(appearance)} /> onChange({ lineHeight })} /> onChange({ textTransform })} /> onChange({ letterSpacing })} /> onChange({ textDecoration })} /> ); }