[]previous and next page

ParentComponent

A component that takes optional children, such as a Card or a Layout.

A component that takes optional children, such as a Card or a Layout.

Import#

ts
import type { ParentComponent } from "@shadow-js/web";

Signature#

ts
type ParentComponent<P = Record<never, never>> = Component<ParentProps<P>>

Examples#

ts
import type { ParentComponent } from "@shadow-js/web";

const Layout: ParentComponent = (props) => <main class="layout">{props.children}</main>;