Registry components enhanced with proper DreamStack patterns: - Card: conditional title/subtitle/footer via when guards, slot for children - Button: variant as string prop, disabled support - Dialog: when-guarded overlay, slot for content, close button - Progress: conditional label, variant support - Input: conditional label, error state, helper text - Alert: variant prop, slot for custom content - Toggle: when-guarded label display - Toast: when-guarded visibility - Avatar: initials with variant - Badge: label with variant prop - Separator: optional centered label New components: - Stat: dashboard metric card (label, value, change delta) - Tabs: tab switcher supporting 2-3 tabs - Select: button-based option selector New example: - component-gallery.ds (89KB): imports 12 components, uses Card+Button, Input+Alert, Progress, Badge+when/else, match expressions, Stat metrics, Toggle, Avatar, Toast, Separator, every timer All 10 examples pass. Browser-tested with zero errors.
12 lines
445 B
Text
12 lines
445 B
Text
-- DreamStack Select Component
|
|
-- Option selector displayed as button group
|
|
|
|
export component Select(value, label, opt1, opt2, opt3, onSelect1, onSelect2, onSelect3) =
|
|
column [
|
|
when label -> text label { variant: "label" }
|
|
row [
|
|
button opt1 { click: onSelect1, variant: "secondary" }
|
|
button opt2 { click: onSelect2, variant: "secondary" }
|
|
when opt3 -> button opt3 { click: onSelect3, variant: "secondary" }
|
|
]
|
|
]
|