feat: Removes api routes and controller as they're currently not used.
All checks were successful
CI / Linux Tests (push) Successful in 5m30s
All checks were successful
CI / Linux Tests (push) Successful in 5m30s
This commit is contained in:
@@ -21,60 +21,6 @@ public struct LabeledInput: HTML, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct Input: HTML, Sendable {
|
||||
|
||||
let id: String?
|
||||
let name: String?
|
||||
let placeholder: String
|
||||
|
||||
private var _name: String {
|
||||
guard let name else {
|
||||
return id ?? ""
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
||||
init(
|
||||
id: String? = nil,
|
||||
name: String? = nil,
|
||||
placeholder: String
|
||||
) {
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.placeholder = placeholder
|
||||
}
|
||||
|
||||
public init(
|
||||
id: String,
|
||||
name: String? = nil,
|
||||
placeholder: String
|
||||
) {
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.placeholder = placeholder
|
||||
}
|
||||
|
||||
public init(
|
||||
name: String,
|
||||
placeholder: String
|
||||
) {
|
||||
self.init(id: nil, name: name, placeholder: placeholder)
|
||||
}
|
||||
|
||||
public var body: some HTML<HTMLTag.input> {
|
||||
input(
|
||||
.id(id ?? ""), .name(_name), .placeholder(placeholder),
|
||||
.class(
|
||||
"""
|
||||
input w-full rounded-md bg-white px-3 py-1.5 text-slate-900 outline-1
|
||||
-outline-offset-1 outline-slate-300 focus:outline focus:-outline-offset-2
|
||||
focus:outline-indigo-600 invalid:border-red-500 out-of-range:border-red-500
|
||||
"""
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
extension HTMLAttribute where Tag == HTMLTag.input {
|
||||
|
||||
public static func max(_ value: String) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user