Verwendung

Build a view wrapper that accepts layout props.

tsx
// Build a view wrapper that accepts layout props.
import { Box, type KuitoNode, type LayoutProps } from 'kuito';

// Only layout passes through: the frame keeps its own look.
function Frame(props: LayoutProps & { children?: KuitoNode }) {
  return <Box borderWidth={1} borderColor="#d1d1d6" borderRadius={8} {...props} />;
}

<Frame width="50%" aspectRatio={1} margin={8} />;

Typdeklaration

ts
export type KuitoNode =
  | KuitoElement
  | string
  | number
  | boolean
  | null
  | undefined
  | ReadonlySignal<KuitoNode>
  | (() => KuitoNode)
  | readonly KuitoNode[];

Typ

ts
string | number | boolean | KuitoElement | ReadonlySignal<KuitoNode> | (() => KuitoNode) | readonly KuitoNode[]
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.