From 2514ca0272a3b5270915b1ee9e48a9c4244b2749 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Sun, 31 Mar 2024 21:19:11 +0100 Subject: :alembic: Create a collection of test apps to cover previously reported bugs. --- test-apps/svg/src/app.gleam | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test-apps/svg/src/app.gleam (limited to 'test-apps/svg/src/app.gleam') diff --git a/test-apps/svg/src/app.gleam b/test-apps/svg/src/app.gleam new file mode 100644 index 0000000..4b0b8b2 --- /dev/null +++ b/test-apps/svg/src/app.gleam @@ -0,0 +1,35 @@ +import lustre +import lustre/attribute.{attribute} +import lustre/element/html +import lustre/element/svg +import lustre/ui +import lustre/ui/icon + +pub fn main() { + let styles = [#("width", "100vw"), #("height", "100vh"), #("padding", "1rem")] + + lustre.element(ui.centre( + [attribute.style(styles)], + html.svg( + [ + attribute("version", "1.1"), + attribute("viewBox", "0 0 300 200"), + attribute("width", "300"), + attribute("height", "200"), + ], + [ + svg.rect([ + attribute("width", "100%"), + attribute("height", "100%"), + attribute("fill", "red"), + ]), + svg.circle([ + attribute("cx", "150"), + attribute("cy", "100"), + attribute("r", "80"), + attribute("fill", "green"), + ]), + ], + ), + )) +} -- cgit v1.2.3