diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-12-22 01:10:59 +0000 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-12-22 11:01:21 +0000 |
commit | 76a166736135a522a740b24d776a2e3b9656fdbd (patch) | |
tree | 75d7fa60c69f850dd2e46a386ae5ed3db0eb4438 /examples/components.gleam | |
parent | fb0e3a9b1835dc30ba196ddb630f02f9d554978a (diff) | |
download | lustre-76a166736135a522a740b24d776a2e3b9656fdbd.tar.gz lustre-76a166736135a522a740b24d776a2e3b9656fdbd.zip |
:heavy_plus_sign: Upgrade to Gleam v0.33.0
Diffstat (limited to 'examples/components.gleam')
-rw-r--r-- | examples/components.gleam | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/examples/components.gleam b/examples/components.gleam index b87cf84..e813708 100644 --- a/examples/components.gleam +++ b/examples/components.gleam @@ -56,18 +56,15 @@ fn update(history, msg) { fn view(history) { let on_custom_click = event.on("custom-click", function.constant(Ok("click"))) - div( - [], - [ - button([event.on_click("reset")], [text("Reset")]), - ol([], list.map(history, fn(msg) { li([], [text(msg)]) })), - element( - "custom-counter", - [on_custom_click, attribute.property("count", list.length(history))], - [ol([], list.map(history, fn(msg) { li([], [text(msg)]) }))], - ), - ], - ) + div([], [ + button([event.on_click("reset")], [text("Reset")]), + ol([], list.map(history, fn(msg) { li([], [text(msg)]) })), + element( + "custom-counter", + [on_custom_click, attribute.property("count", list.length(history))], + [ol([], list.map(history, fn(msg) { li([], [text(msg)]) }))], + ), + ]) } // COUNTER --------------------------------------------------------------------- @@ -89,12 +86,9 @@ fn counter_update(count, msg) { } fn counter_view(count) { - div( - [], - [ - button([event.on_click(Clicked)], [text("Click me!")]), - p([], [text("Count: "), text(int.to_string(count))]), - slot([]), - ], - ) + div([], [ + button([event.on_click(Clicked)], [text("Click me!")]), + p([], [text("Count: "), text(int.to_string(count))]), + slot([]), + ]) } |