import * as React from "react"; import { useStyletron } from "baseui"; import * as Icons from "baseui/icon/icon-exports"; function makeImportStatement(key: string) { const path = key .split(/(?=[A-Z])/) .map((word) => word.toLowerCase()) .join("-"); return `import ${key} from 'baseui/icon/${path}'`; } function Row(props: any) { const [css, theme] = useStyletron(); const Icon = props.icon; return (
{props.title}
{makeImportStatement(props.title)}
); } export default function Example() { return (
{Object.entries(Icons).map(([title, Icon]: [string, any]) => ( ))}
); }