WIP: Working on friction rate worksheet views.

This commit is contained in:
2025-12-31 21:56:43 -05:00
parent 591875cf13
commit 24c87602e9
12 changed files with 326 additions and 11 deletions

View File

@@ -51,3 +51,32 @@ public struct CancelButton: HTML, Sendable {
}
}
}
public struct EditButton: HTML, Sendable {
let title: String
let type: HTMLAttribute<HTMLTag.button>.ButtonType
public init(
title: String = "Edit",
type: HTMLAttribute<HTMLTag.button>.ButtonType = .button
) {
self.title = title
self.type = type
}
public var body: some HTML<HTMLTag.button> {
button(
.class(
"""
text-white font-bold text-xl bg-blue-500 hover:bg-blue-600 px-4 py-2 rounded-lg shadow-lg
"""
),
.type(type)
) {
div(.class("flex")) {
span(.class("pe-2")) { title }
SVG(.squarePen)
}
}
}
}