From 7a96fce836133f97218c494cfe5419245e0146a9 Mon Sep 17 00:00:00 2001 From: Cassie <139658770+0xca551e@users.noreply.github.com> Date: Tue, 19 Mar 2024 14:44:45 +0000 Subject: =?UTF-8?q?=F0=9F=94=80=20Add=20label=20argument=20to=20html.optio?= =?UTF-8?q?n=20(#68)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add children argument to html.option * Change html.option argument from children to label --- src/lustre/element/html.gleam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lustre/element/html.gleam b/src/lustre/element/html.gleam index 588642d..d0d6d0b 100644 --- a/src/lustre/element/html.gleam +++ b/src/lustre/element/html.gleam @@ -821,8 +821,8 @@ pub fn optgroup( } /// -pub fn option(attrs: List(Attribute(msg))) -> Element(msg) { - element.element("option", attrs, []) +pub fn option(attrs: List(Attribute(msg)), label: String) -> Element(msg) { + element.element("option", attrs, [element.text(label)]) } /// -- cgit v1.2.3