diff options
author | Danny Martini <despair.blue@gmail.com> | 2023-03-07 02:16:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 01:16:34 +0000 |
commit | 2feb2a8e1a427cb7545785e2678e4523533c432e (patch) | |
tree | e7d69bd9d8b05c5e547e34e4cfe011d9e235a6de | |
parent | 26bfe8b0ed866a94ddcc719a517f9f5cd28525ae (diff) | |
download | lustre-2feb2a8e1a427cb7545785e2678e4523533c432e.tar.gz lustre-2feb2a8e1a427cb7545785e2678e4523533c432e.zip |
🐛 Rename `for` attribute string to `htmlFor` to reflect usage in React. (#7)
`for` can't be use in JS as it's a reserved keyword, so react renamed the property to `htmlFor`
-rw-r--r-- | src/lustre/attribute.gleam | 2 |
1 files changed, 1 insertions, 1 deletions
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 ---------------------------------------------------------------- |