aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCassie <139658770+0xca551e@users.noreply.github.com>2024-03-19 14:44:45 +0000
committerGitHub <noreply@github.com>2024-03-19 14:44:45 +0000
commit7a96fce836133f97218c494cfe5419245e0146a9 (patch)
treee9e6e46cb25acc79848c894a85f4725258839fce
parent19a6bab853c5360d7a114eada66467967e1f9997 (diff)
downloadlustre-7a96fce836133f97218c494cfe5419245e0146a9.tar.gz
lustre-7a96fce836133f97218c494cfe5419245e0146a9.zip
🔀 Add label argument to html.option (#68)
* Add children argument to html.option * Change html.option argument from children to label
-rw-r--r--src/lustre/element/html.gleam4
1 files changed, 2 insertions, 2 deletions
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)])
}
///