AnthoLume/ngtemplates/components/info_card.templ
Evan Reichard 3cf374ea2b
Some checks reported errors
continuous-integration/drone/push Build was killed
templ wip 2
2024-10-06 17:01:37 -04:00

27 lines
652 B
Plaintext

package components
import (
"fmt"
)
templ InfoCard(name string, metric int) {
<div class="w-full">
@infoCardInner(name, metric)
</div>
}
templ InfoCardLink(name string, metric int, link string) {
<a href={ templ.SafeURL(link) } class="w-full">
@infoCardInner(name, metric)
</a>
}
templ infoCardInner(name string, metric int) {
<div class="flex gap-4 w-full p-4 bg-white shadow-lg dark:bg-gray-700 rounded">
<div class="flex flex-col justify-around dark:text-white w-full text-sm">
<p class="text-2xl font-bold text-black dark:text-white">{ fmt.Sprint(metric) }</p>
<p class="text-sm text-gray-400">{ name }</p>
</div>
</div>
}