aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lustre/event.gleam2
-rw-r--r--test/playground/main.gleam36
2 files changed, 17 insertions, 21 deletions
diff --git a/src/lustre/event.gleam b/src/lustre/event.gleam
index 3818dac..251b92a 100644
--- a/src/lustre/event.gleam
+++ b/src/lustre/event.gleam
@@ -2,7 +2,7 @@
// IMPORTS ---------------------------------------------------------------------
-import gleam/dynamic.{DecodeError, Decoder, Dynamic}
+import gleam/dynamic.{DecodeError, Dynamic}
import gleam/result
import lustre/attribute.{Attribute}
diff --git a/test/playground/main.gleam b/test/playground/main.gleam
index 6b7f7f7..0b0bbe1 100644
--- a/test/playground/main.gleam
+++ b/test/playground/main.gleam
@@ -1,32 +1,28 @@
import gleam/io
import lustre
-import lustre/attribute.{ Attribute, attribute }
-import lustre/element.{ Element }
+import lustre/attribute.{attribute}
import playground/monaco
pub type Action {
- OnInput(String)
+ OnInput(String)
}
-pub fn main () {
- let init = "// Write some Gleam code here"
+pub fn main() {
+ let init = "// Write some Gleam code here"
- let update = fn (_, action) {
- case action {
- OnInput(input) ->
- io.debug(input)
- }
+ let update = fn(_, action) {
+ case action {
+ OnInput(input) -> io.debug(input)
}
+ }
- let render = fn (state) {
- monaco.render([
- attribute("value", state),
- monaco.on_change(fn (code, dispatch) {
- dispatch(OnInput(code))
- })
- ])
- }
+ let render = fn(state) {
+ monaco.render([
+ attribute("value", state),
+ monaco.on_change(fn(code, dispatch) { dispatch(OnInput(code)) }),
+ ])
+ }
- lustre.simple(init, update, render)
- |> lustre.start("[data-lustre-container]")
+ lustre.simple(init, update, render)
+ |> lustre.start("[data-lustre-container]")
}