2024-03-14 20:39:26 +00:00
|
|
|
package components
|
2024-03-15 03:56:49 +00:00
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
type InfoBoxConfig struct {
|
|
|
|
ColourClass string
|
|
|
|
InFlex bool
|
|
|
|
FlexBasis string
|
|
|
|
}
|
|
|
|
|
2024-03-15 22:48:11 +00:00
|
|
|
templ InfoBox(title string, colour string) {
|
2024-03-15 03:56:49 +00:00
|
|
|
<div class={
|
|
|
|
"infobox",
|
2024-03-15 22:48:11 +00:00
|
|
|
"h-full",
|
|
|
|
fmt.Sprintf("bg-%s-900", colour),
|
|
|
|
fmt.Sprintf("text-%s-100", colour),
|
|
|
|
fmt.Sprintf("shadow-%s-900", colour),
|
|
|
|
fmt.Sprintf("divide-%s-800", colour),
|
|
|
|
fmt.Sprintf("border-%s-800", colour),
|
2024-03-15 03:56:49 +00:00
|
|
|
}>
|
|
|
|
<h3 class="text-xl font-semibold">{ title }</h3>
|
2024-03-15 22:48:11 +00:00
|
|
|
{ children... }
|
2024-03-15 03:56:49 +00:00
|
|
|
</div>
|
|
|
|
}
|