WIP: Working signup and login forms, along with initial view auth middleware.
This commit is contained in:
26
Sources/Styleguide/Indicator.swift
Normal file
26
Sources/Styleguide/Indicator.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
import Elementary
|
||||
|
||||
public struct Indicator: HTML, Sendable {
|
||||
|
||||
let size: Size
|
||||
|
||||
public init(size: Size = .lg) {
|
||||
self.size = size
|
||||
}
|
||||
|
||||
public var body: some HTML<HTMLTag.span> {
|
||||
span(.class("loading loading-spinner \(size.class) htmx-indicator")) {}
|
||||
}
|
||||
|
||||
public enum Size: String, Equatable, Sendable {
|
||||
case xs
|
||||
case sm
|
||||
case md
|
||||
case lg
|
||||
case xl
|
||||
|
||||
var `class`: String {
|
||||
"loading-\(rawValue)"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user