-
Notifications
You must be signed in to change notification settings - Fork 0
/
subnav.go
55 lines (48 loc) · 1.03 KB
/
subnav.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package components
import (
htmx "github.com/zeiss/fiber-htmx"
)
// SubNavProps ...
type SubNavProps struct {
ClassNames htmx.ClassNames
}
// SubNav ...
func SubNav(p SubNavProps, children ...htmx.Node) htmx.Node {
return htmx.Div(
htmx.Merge(
htmx.ClassNames{
"navbar": true,
"bg-base-100": true,
"w-full": true,
"border-neutral": true,
"border-b": true,
"border-t": true,
"px-6": true,
},
p.ClassNames,
),
htmx.Group(children...),
)
}
// SubNavBreadcrumbProps ...
type SubNavBreadcrumbProps struct{}
// SubNavBreadcrumb ...
func SubNavBreadcrumb(p SubNavBreadcrumbProps, children ...htmx.Node) htmx.Node {
return htmx.Div(
htmx.ClassNames{
"navbar-start": true,
},
htmx.Group(children...),
)
}
// SubNavActionsProps ...
type SubNavActionsProps struct{}
// SubNavActions ...
func SubNavActions(p SubNavActionsProps, children ...htmx.Node) htmx.Node {
return htmx.Div(
htmx.ClassNames{
"navbar-end": true,
},
htmx.Group(children...),
)
}