import { FC, useMemo } from 'react'; import { Schemas } from '@l-clutch/core'; import { AreaTemplateRow, TemplateRow } from './AreaTemplateRow'; type AreaTemplateProps = { template: Template; setBounds?: (ratioBounds: Schemas['RichMenuBounds']) => void; }; export const AreaTemplate: FC = ({ template, setBounds }) => { const gridTemplateRows = useMemo(() => `repeat(${template.height}, 1fr)`, [template]); return (
{template.rows.map((row, index) => ( ))}
); }; export type Template = { aspectRatio: number; height: number; rows: TemplateRow[]; }; export * from './TEMPLATES'; export * from './AreaTemplateSelectModal';