meo-canvas
    Preparing search index...

    Type Alias ContainerProps

    ContainerProps: Style & { children?: Children; name?: string }

    What every container factory accepts: its style, flat, plus its children.

    The style properties are the props, and the props object is stored as the style without a copy: children and name are not style properties, so the encoder never reads them.

    A misspelt property is caught at compile time only in a literal. TypeScript checks excess properties on a fresh object literal alone, so Box({ marginLeft: 4 }) is refused while Box({ ...held }) is not; the factory refuses the unknown key at run time instead. Naming the type where a spread is unavoidable — const base: ContainerProps = { … } — catches it earlier.

    Type Declaration

    • Optional Readonlychildren?: Children

      Its children, drawn in order. A single child need not be wrapped.

    • Optional Readonlyname?: string

      A name carried through for diagnostics.