Files
swift-hvac-toolbox/Sources/Styleguide/Buttons.swift
2025-02-26 22:13:38 -05:00

22 lines
470 B
Swift

import Elementary
public struct SubmitButton: HTML, Sendable {
let label: String
public init(label: String) {
self.label = label
}
public var content: some HTML<HTMLTag.button> {
button(
.type(.submit),
.class("""
w-full font-bold py-3 rounded-md transition-colors
bg-yellow-300 dark:bg-blue-500
hover:bg-yellow-400 hover:dark:bg-blue-600
text-blue-500 dark:text-yellow-300
""")
) { label }
}
}