Files
zeekayandHanzo Dev bf9fbd156f Document the whole library from its own source
The docs site renders every component the barrel names, the gallery
harvests rules for all of them, and the pages come from the packages
rather than a hand-kept copy.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-07 18:59:54 -07:00

30 lines
959 B
TypeScript

import { YStack } from "@hanzo/gui"
import { Editor } from "@hanzo/ui"
/** Default — a bold/italic/list toolbar above a blank contentEditable field. */
export function Default() {
return (
<YStack width="100%" minH={280} items="center" justify="center">
<Editor width="100%" maxW={480} />
</YStack>
)
}
/** With content — starts the region with existing HTML rather than empty. */
export function WithContent() {
return (
<YStack width="100%" minH={280} items="center" justify="center">
<Editor width="100%" maxW={480} value="<p><strong>Hello</strong> there — <em>start editing</em>.</p>" />
</YStack>
)
}
/** Custom placeholder — shown by the surrounding app's CSS when the field is empty. */
export function CustomPlaceholder() {
return (
<YStack width="100%" minH={280} items="center" justify="center">
<Editor width="100%" maxW={480} placeholder="Write your notes here..." />
</YStack>
)
}