import type { ComponentChildren } from 'preact'; interface AppProps { showExtra?: boolean; title?: string; } function Header({ title }: { title: string }) { return {title}; } function Content({ children }: { children?: ComponentChildren }) { return {children}; } function Card({ children }: { children?: ComponentChildren }) { return {children}; } export function App({ showExtra = false, title = 'Main' }: AppProps) { return (
A {showExtra ? B : null} ); } export const mainProps = { title: 'Main', showExtra: false }; export const backgroundProps = { title: 'BG', showExtra: true };