30 lines
569 B
Text
30 lines
569 B
Text
// templui component skeleton - version: v1.2.0 installed by templui v1.2.0
|
|
// 📚 Documentation: https://templui.io/docs/components/skeleton
|
|
package skeleton
|
|
|
|
import "git.juancwu.dev/juancwu/budgit/internal/utils"
|
|
|
|
type Props struct {
|
|
ID string
|
|
Class string
|
|
Attributes templ.Attributes
|
|
}
|
|
|
|
templ Skeleton(props ...Props) {
|
|
{{ var p Props }}
|
|
if len(props) > 0 {
|
|
{{ p = props[0] }}
|
|
}
|
|
<div
|
|
if p.ID != "" {
|
|
id={ p.ID }
|
|
}
|
|
class={
|
|
utils.TwMerge(
|
|
"animate-pulse rounded bg-muted",
|
|
p.Class,
|
|
),
|
|
}
|
|
{ p.Attributes... }
|
|
></div>
|
|
}
|