aboutsummaryrefslogtreecommitdiff
path: root/test-apps/svg/src
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2024-03-31 21:19:11 +0100
committerHayleigh Thompson <me@hayleigh.dev>2024-03-31 21:19:11 +0100
commit2514ca0272a3b5270915b1ee9e48a9c4244b2749 (patch)
treea328a236b14f0c0cfa01c3d15059935af9b19e14 /test-apps/svg/src
parent3aa3500ed177cbd5b0ab5b4b68a8a45aee4e56d2 (diff)
downloadlustre-2514ca0272a3b5270915b1ee9e48a9c4244b2749.tar.gz
lustre-2514ca0272a3b5270915b1ee9e48a9c4244b2749.zip
:alembic: Create a collection of test apps to cover previously reported bugs.
Diffstat (limited to 'test-apps/svg/src')
-rw-r--r--test-apps/svg/src/app.gleam35
1 files changed, 35 insertions, 0 deletions
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"),
+ ]),
+ ],
+ ),
+ ))
+}