mirror of
https://github.com/hanzoai/ui.git
synced 2026-11-21 00:18:41 +00:00
Appearance drops the Violet swatches and refuses purple accents and highlights in set, write, read, apply and the painted-vars cache. --art-iris stays as a token with a neutral value. Charts and agent chrome use ink and neutral greys. Co-authored-by: Hanzo Dev <[email protected]>
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { XStack, YStack, SizableText } from '@hanzo/gui'
|
|
import { QRCode } from '@hanzo/ui'
|
|
|
|
/** Default — a QR code for a URL at its default 256px size. */
|
|
export function Default() {
|
|
return <QRCode value="https://ui.hanzo.ai" />
|
|
}
|
|
|
|
/** Sizes — the same value rendered at three pixel sizes. */
|
|
export function Sizes() {
|
|
return (
|
|
<XStack gap="$4" items="center">
|
|
{[96, 160, 224].map((size) => (
|
|
<QRCode key={size} value="https://ui.hanzo.ai" size={size} />
|
|
))}
|
|
</XStack>
|
|
)
|
|
}
|
|
|
|
/** Error correction — the same value at each of the four correction levels. */
|
|
export function ErrorCorrection() {
|
|
return (
|
|
<XStack gap="$4" items="center" flexWrap="wrap">
|
|
{(['L', 'M', 'Q', 'H'] as const).map((level) => (
|
|
<YStack key={level} gap="$2" items="center">
|
|
<QRCode value="https://ui.hanzo.ai" size={120} level={level} />
|
|
<SizableText size="$2" color="$quiet">
|
|
{level}
|
|
</SizableText>
|
|
</YStack>
|
|
))}
|
|
</XStack>
|
|
)
|
|
}
|
|
|
|
/** Colors and margin — custom foreground/background with a quiet-zone margin. */
|
|
export function Styled() {
|
|
return <QRCode value="https://ui.hanzo.ai" fgColor="#09090b" bgColor="#f4f4f5" includeMargin size={200} />
|
|
}
|