From 2feb2a8e1a427cb7545785e2678e4523533c432e Mon Sep 17 00:00:00 2001 From: Danny Martini Date: Tue, 7 Mar 2023 02:16:34 +0100 Subject: =?UTF-8?q?=F0=9F=90=9B=20Rename=20`for`=20attribute=20string=20to?= =?UTF-8?q?=20`htmlFor`=20to=20reflect=20usage=20in=20React.=20(#7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `for` can't be use in JS as it's a reserved keyword, so react renamed the property to `htmlFor` --- src/lustre/attribute.gleam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lustre/attribute.gleam b/src/lustre/attribute.gleam index 51ef13b..6fa609f 100644 --- a/src/lustre/attribute.gleam +++ b/src/lustre/attribute.gleam @@ -143,7 +143,7 @@ pub fn required(is_required: Bool) -> Attribute(msg) { /// pub fn for(id: String) -> Attribute(msg) { - attribute("for", id) + attribute("htmlFor", id) } // INPUT RANGES ---------------------------------------------------------------- -- cgit v1.2.3