feat: Working on dehumidifier sizing, api and routes implemented, views are not complete.
This commit is contained in:
20
Sources/Styleguide/Note.swift
Normal file
20
Sources/Styleguide/Note.swift
Normal file
@@ -0,0 +1,20 @@
|
||||
import Elementary
|
||||
|
||||
public struct Note: HTML, Sendable {
|
||||
let label: String
|
||||
let text: String
|
||||
|
||||
public init(_ label: String = "Note:", _ text: () -> String) {
|
||||
self.label = label
|
||||
self.text = text()
|
||||
}
|
||||
|
||||
public var content: some HTML {
|
||||
div(.class("mt-8 p-4 bg-gray-100 dark:bg-gray-700 rounded-md shadow-md border border-blue-500")) {
|
||||
p(.class("text-sm text-blue-500")) {
|
||||
span(.class("font-extrabold pe-2")) { label }
|
||||
text
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user