25 lines
481 B
Plaintext
25 lines
481 B
Plaintext
|
package components
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type InfoBoxConfig struct {
|
||
|
ColourClass string
|
||
|
InFlex bool
|
||
|
FlexBasis string
|
||
|
}
|
||
|
|
||
|
templ InfoBox(title string, colour string) {
|
||
|
<div class={
|
||
|
"infobox",
|
||
|
"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),
|
||
|
}>
|
||
|
<h3 class="text-xl font-semibold">{ title }</h3>
|
||
|
{ children... }
|
||
|
</div>
|
||
|
}
|