24 lines
589 B
Text
24 lines
589 B
Text
|
|
-- Compose Search + Map widgets into one view
|
||
|
|
--
|
||
|
|
-- Run with:
|
||
|
|
-- Tab 1: dreamstack stream examples/widget-search.ds
|
||
|
|
-- Tab 2: dreamstack stream examples/widget-map.ds --port 9101
|
||
|
|
-- Tab 3: dreamstack dev examples/compose-search-map.ds --port 3001
|
||
|
|
|
||
|
|
let search = stream from "ws://localhost:9100"
|
||
|
|
let map = stream from "ws://localhost:9101"
|
||
|
|
|
||
|
|
view main =
|
||
|
|
row [
|
||
|
|
column [
|
||
|
|
text "🔍 Search"
|
||
|
|
text "Query: {search.query}"
|
||
|
|
text "Results: {search.filtered}"
|
||
|
|
]
|
||
|
|
column [
|
||
|
|
text "📍 Map"
|
||
|
|
text "{map.label}"
|
||
|
|
text "{map.lat}, {map.lng}"
|
||
|
|
]
|
||
|
|
]
|