Parser:
- column/row/stack now parse trailing { props } after ]
- Enables: column [...] { variant: "card" }
Codegen:
- Container props dispatch: variant, class, click, style, layout
- variant_to_css() maps (tag, variant) → CSS class
- variant_map_js() for dynamic variants via inline JS map
- 230+ lines design system CSS (button/badge/card/dialog/toast/
progress/alert/separator/toggle/avatar/stat)
Registry (11 components):
- button, input, card, badge, dialog, toast
- NEW: progress, alert, separator, toggle, avatar
- All embedded via include_str! for offline use
Examples:
- showcase.ds: component gallery with variant prop
- dashboard.ds: admin dashboard with glassmorphism cards
8 lines
235 B
Text
8 lines
235 B
Text
-- DreamStack Card Component
|
|
-- Glassmorphism container with title and subtitle
|
|
|
|
export component Card(title, subtitle) =
|
|
column [
|
|
text title { variant: "title" }
|
|
text subtitle { variant: "subtitle" }
|
|
] { variant: "card" }
|