feat: Adds page header styles, starts an Alert component.

This commit is contained in:
2026-01-14 23:09:28 -05:00
parent 86307dfa05
commit 1b88f81b5f
15 changed files with 272 additions and 140 deletions

View File

@@ -1,6 +1,18 @@
import Elementary
public struct Tooltip<Inner: HTML & Sendable>: HTML, Sendable {
extension HTML {
public func tooltip(
_ tip: String,
position: TooltipPosition = .default
) -> Tooltip<Self> {
Tooltip(tip, position: position) {
self
}
}
}
public struct Tooltip<Inner: HTML>: HTML {
let tooltip: String
let position: TooltipPosition
@@ -26,6 +38,8 @@ public struct Tooltip<Inner: HTML & Sendable>: HTML, Sendable {
}
}
extension Tooltip: Sendable where Inner: Sendable {}
public enum TooltipPosition: String, CaseIterable, Sendable {
public static let `default` = Self.left