summaryrefslogtreecommitdiff
path: root/demo/more/expandable.ur
diff options
context:
space:
mode:
Diffstat (limited to 'demo/more/expandable.ur')
-rw-r--r--demo/more/expandable.ur23
1 files changed, 0 insertions, 23 deletions
diff --git a/demo/more/expandable.ur b/demo/more/expandable.ur
deleted file mode 100644
index 92d8743c..00000000
--- a/demo/more/expandable.ur
+++ /dev/null
@@ -1,23 +0,0 @@
-con t ctx = source bool * xml ctx [] []
-
-fun create [ctx] (x : xml ctx [] []) =
- s <- source False;
- return (s, x)
-
-fun expand [ctx] (t : t ctx) =
- set t.1 True
-
-fun collapse [ctx] (t : t ctx) =
- set t.1 False
-
-fun render [ctx] [[Body] ~ ctx] (t : t ([Body] ++ ctx)) =
- <xml><dyn signal={b <- signal t.1;
- return (if b then
- <xml>
- <button value="-" onclick={collapse t}/><br/>
- {t.2}
- </xml>
- else
- <xml>
- <button value="+" onclick={expand t}/><br/>
- </xml>)}/></xml>