diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2024-02-18 11:08:06 +0000 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2024-02-18 11:08:06 +0000 |
commit | d2bf53a4ade4bf283fdd1b40786fa913ae547b09 (patch) | |
tree | 9e3d11a56f8985bbc267e464555ef914356f100e /examples/01-hello-world/src | |
parent | 15c562113f61e6088e4414f7236270cd5c9fe51c (diff) | |
download | lustre-d2bf53a4ade4bf283fdd1b40786fa913ae547b09.tar.gz lustre-d2bf53a4ade4bf283fdd1b40786fa913ae547b09.zip |
:memo: Update references from 'lustre/try' to 'lustre dev'.
Diffstat (limited to 'examples/01-hello-world/src')
-rw-r--r-- | examples/01-hello-world/src/app.gleam | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/examples/01-hello-world/src/app.gleam b/examples/01-hello-world/src/app.gleam index 5d2b50a..3e11f5b 100644 --- a/examples/01-hello-world/src/app.gleam +++ b/examples/01-hello-world/src/app.gleam @@ -2,26 +2,24 @@ import lustre import lustre/attribute import lustre/element import lustre/element/html -// These examples are written with lustre_ui in mind. They'll work regardless, -// but to see what lustre_ui can do make sure to run each of these examples with +// These examples are written with `lustre/ui` in mind. They'll work regardless, +// but to see what `lustre/ui` can do make sure to run each of these examples with // the `--include-styles` flag: // -// $ gleam run -m lustre/try -- --include-styles +// $ gleam run -m lustre dev --include-styles // -// In your own apps, make sure to add the `lustre_ui` dependency and include the +// In your own apps, make sure to add the `lustre/ui` dependency and include the // stylesheet somewhere. import lustre/ui pub fn main() { let styles = [#("width", "100vw"), #("height", "100vh"), #("padding", "1rem")] - let app = - lustre.element(ui.centre( - [attribute.style(styles)], - html.div([], [ - html.h1([], [element.text("Hello, world.")]), - html.h2([], [element.text("Welcome to Lustre.")]), - ]), - )) - let assert Ok(_) = lustre.start(app, "#app", Nil) + lustre.element(ui.centre( + [attribute.style(styles)], + html.div([], [ + html.h1([], [element.text("Hello, world.")]), + html.h2([], [element.text("Welcome to Lustre.")]), + ]), + )) } |