Files
zeekay 6256a185a2 Port forty-one components onto the gui backend
Each carries its typed props, a behaviour suite and live examples the
docs render from source, so ui.hanzo.ai documents them the moment the
barrel names them.
2026-09-07 01:34:01 -07:00

59 lines
1.6 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { YStack } from "@hanzo/gui"
import {
Button,
Empty,
EmptyContent,
EmptyDescription,
EmptyHeader,
EmptyMedia,
EmptyTitle,
} from "@hanzo/ui"
/** Default — a media slot above a title and description, with a button in the content slot. */
export function Default() {
return (
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">+</EmptyMedia>
<EmptyTitle>No data</EmptyTitle>
<EmptyDescription>No data found. Add one to get started.</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<Button>Add data</Button>
</EmptyContent>
</Empty>
)
}
/** Plain media — `variant="default"` leaves the media unboxed, for a larger custom icon or logo. */
export function PlainMedia() {
return (
<Empty>
<EmptyHeader>
<EmptyMedia>🗂️</EmptyMedia>
<EmptyTitle>No projects</EmptyTitle>
<EmptyDescription>You have not created any projects yet.</EmptyDescription>
</EmptyHeader>
</Empty>
)
}
/** With actions — two buttons stacked in the content slot below the description. */
export function WithActions() {
return (
<Empty>
<EmptyHeader>
<EmptyMedia variant="icon">⚠</EmptyMedia>
<EmptyTitle>Something went wrong</EmptyTitle>
<EmptyDescription>We could not load your notifications.</EmptyDescription>
</EmptyHeader>
<EmptyContent>
<YStack gap="$2" width="100%">
<Button>Retry</Button>
<Button variant="outline">Go back</Button>
</YStack>
</EmptyContent>
</Empty>
)
}