Implemented phase 2 for the POC prototype in the Website service.

This commit is contained in:
javier committed 2026-09-21 11:44:58 +02:00
1 parent 09c7b8a1a7
commit 43dcc03da6
28 files changed
+1468 -65

No files matched your search

@@ -0,0 +1,41 @@
import Elementary
/// An action the prototype shows but does not build: a button that is visibly, and audibly, unavailable.
struct Unavailable: HTML {
// MARK: Properties
/// The action's name.
let label: String
/// A modifier class sizing or styling the button, or `nil` for none.
let modifier: String?
// MARK: Initializers
/// Creates an unavailable action.
/// - Parameters:
/// - label: the action's name.
/// - modifier: a modifier class sizing or styling the button, or `nil` (the default) for none.
init(
_ label: String,
modifier: String? = nil
) {
self.label = label
self.modifier = modifier
}
// MARK: Computed
var body: some HTML {
button(
.class(["button", modifier].compactMap(\.self).joined(separator: " ")),
.type(.button),
.disabled,
.title("Not part of the prototype")
) {
label
}
}
}