From 24cfbe8727c3e21019cc11934d6f289b2b4cf7ea Mon Sep 17 00:00:00 2001 From: tristan Date: Sun, 31 Dec 2023 01:14:45 +0000 Subject: [PATCH] add div, section, span --- nixite/elems.nix | 9 +++++++++ testing/elems.test.nix | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/nixite/elems.nix b/nixite/elems.nix index acd6c66..75e5e6e 100644 --- a/nixite/elems.nix +++ b/nixite/elems.nix @@ -4,6 +4,15 @@ in { p = child: html.tag "p" {} child; + div = child: + html.tag "div" {} child; + + section = child: + html.tag "section" {} child; + + span = child: + html.tag "span" {} child; + main = child: html.tag "main" {} child; diff --git a/testing/elems.test.nix b/testing/elems.test.nix index ba70564..7d06025 100644 --- a/testing/elems.test.nix +++ b/testing/elems.test.nix @@ -8,6 +8,18 @@ in expected = html.tag "p" {} "foobar"; actual = p "foobar"; }) + (it "makes a div tag" { + expected = html.tag "div" {} "foobar"; + actual = div "foobar"; + }) + (it "makes a section tag" { + expected = html.tag "section" {} "foobar"; + actual = section "foobar"; + }) + (it "makes a span tag" { + expected = html.tag "span" {} "foobar"; + actual = span "foobar"; + }) (it "makes a main tag" { expected = html.tag "main" {} ["yeet"]; actual = main ["yeet"];