import { Utility } from "@hpcc-js/common"; import * as React from "@hpcc-js/preact-shim"; interface ImageChar { x?: number; y?: number; height?: number; fill?: string; stroke?: string; fontFamily?: string; char?: string; yOffset?: number; } export const ImageChar: React.FunctionComponent = ({ x, y = 0, height = 12, fill, stroke, fontFamily = "FontAwesome", char = "" }) => { const renderChar = React.useMemo(() => { return fontFamily === "FontAwesome" ? Utility.faChar(char) : char; }, [char, fontFamily]); return {renderChar}; };