Add fonts, autotable, autotable examples
This commit is contained in:
@@ -113,20 +113,18 @@ func TabGroup(p TabGroupProps) *vdom.VNode {
|
||||
vdom.Text(item.Title),
|
||||
}
|
||||
if item.Badge > 0 {
|
||||
btn = append(btn, vdom.El("span",
|
||||
vdom.Attr("class", "inline-flex items-center justify-center min-w-5 h-5 px-1 text-xs font-semibold bg-primary text-white rounded-full"),
|
||||
btn = append(btn, vdom.Span(vdom.Attr("class", "inline-flex items-center justify-center min-w-5 h-5 px-1 text-xs font-semibold bg-primary text-white rounded-full"),
|
||||
vdom.Text(strconv.Itoa(item.Badge))))
|
||||
}
|
||||
header = append(header, vdom.El("button", btn...))
|
||||
header = append(header, vdom.Button(btn...))
|
||||
}
|
||||
if p.Actions != nil {
|
||||
header = append(header, vdom.El("div",
|
||||
vdom.Attr("class", "tab-actions flex-1 self-end border-b-2 border-neutral-200 flex items-center justify-end pb-1"),
|
||||
vdom.El("div", vdom.Attr("class", "flex items-center min-w-0"), p.Actions),
|
||||
header = append(header, vdom.Div(vdom.Attr("class", "tab-actions flex-1 self-end border-b-2 border-neutral-200 flex items-center justify-end pb-1"),
|
||||
vdom.Div(vdom.Attr("class", "flex items-center min-w-0"), p.Actions),
|
||||
))
|
||||
}
|
||||
|
||||
root := []vdom.Mod{vdom.Attr("class", rootCls), vdom.El("div", header...)}
|
||||
root := []vdom.Mod{vdom.Attr("class", rootCls), vdom.Div(header...)}
|
||||
|
||||
hasInlinePanels := false
|
||||
for _, item := range p.Items {
|
||||
@@ -140,8 +138,8 @@ func TabGroup(p TabGroupProps) *vdom.VNode {
|
||||
if item.Content == nil {
|
||||
continue
|
||||
}
|
||||
root = append(root, vdom.El("div", vdom.Attr("class", panelCls(i)), item.Content))
|
||||
root = append(root, vdom.Div(vdom.Attr("class", panelCls(i)), item.Content))
|
||||
}
|
||||
}
|
||||
return vdom.El("div", root...)
|
||||
return vdom.Div(root...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user