- emit_component_decl now wraps props in signal-like accessors
- Props use { get value() { return props.X; } } pattern
- Missing props default to empty string instead of null
- Added examples/import-demo.ds demonstrating 3-component import
- Zero console errors when rendering imported Card, Badge, Button
20 lines
615 B
Text
20 lines
615 B
Text
-- DreamStack Import Demo
|
|
-- Demonstrates component imports from registry
|
|
|
|
import { Button } from "../registry/components/button"
|
|
import { Card } from "../registry/components/card"
|
|
import { Badge } from "../registry/components/badge"
|
|
|
|
let count = 0
|
|
|
|
view main = column [
|
|
text "🧩 Component Composition" { variant: "title" }
|
|
text "Imported 3 components from registry" { variant: "subtitle" }
|
|
|
|
Card { title: "Counter Card" }
|
|
Badge { label: "imported", variant: "success" }
|
|
Button { label: "Click me", variant: "primary" }
|
|
|
|
text "Count: {count}"
|
|
button "+1" { click: count += 1, variant: "primary" }
|
|
]
|