- AST: added Expr::Slot variant
- Parser: 'slot' keyword renders children, [...] bracket children after ComponentUse
- Codegen: DS_{name}(props, __children) factory pattern
- Type checker: Slot => Type::View
- Updated Card component with slot for children
- Added examples/slot-demo.ds
9 lines
274 B
Text
9 lines
274 B
Text
-- DreamStack Card Component with Slot
|
|
-- Glassmorphism container with title, subtitle, and slot for children
|
|
|
|
export component Card(title, subtitle) =
|
|
column [
|
|
text title { variant: "title" }
|
|
text subtitle { variant: "subtitle" }
|
|
slot
|
|
] { variant: "card" }
|