We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9caf716 commit dbd52bdCopy full SHA for dbd52bd
Sources/SwiftHtml/Html/Tags/Input.swift
@@ -18,6 +18,7 @@ public final class Input: Tag {
18
}
19
20
public extension Input {
21
+
22
enum `Type`: String {
23
case button
24
case checkbox
@@ -43,6 +44,13 @@ public extension Input {
43
44
case week
45
46
47
+ /// Sets both the name and id
48
+ func key(_ value: String) -> Self {
49
+ node.upsert(Attribute(key: "id", value: value))
50
+ node.upsert(Attribute(key: "name", value: value))
51
+ return self
52
+ }
53
54
/// Specifies a filter for what file types the user can pick from the file input dialog box (only for type="file")
55
func accept(_ value: String) -> Self {
56
node.upsert(Attribute(key: "accept", value: value))
0 commit comments