dreamstack/examples/import-demo.ds

21 lines
615 B
Text
Raw Normal View History

-- 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" }
]