WIP: Moves some common views to a Styleguide module, working on room table and form.

This commit is contained in:
2025-12-31 16:16:39 -05:00
parent c29e1acffe
commit 34bba7bdfc
15 changed files with 370 additions and 90 deletions

View File

@@ -0,0 +1,29 @@
import Elementary
public struct SVG: HTML, Sendable {
let key: Key
public init(_ key: Key) {
self.key = key
}
public var body: some HTML {
HTMLRaw(key.svg)
}
}
extension SVG {
public enum Key: Sendable {
case close
var svg: String {
switch self {
case .close:
return """
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-x-icon lucide-x"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
"""
}
}
}
}