-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontainers.templ
More file actions
49 lines (46 loc) · 1.08 KB
/
containers.templ
File metadata and controls
49 lines (46 loc) · 1.08 KB
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
package popui
import (
"github.com/invopop/popui.go/props"
"github.com/invopop/popui.go/tailwind"
)
// PopupConfigContainer provides a wrapper for sidebar popups used on the Invopop Console UI
// Deprecated: use Main component inside an App instead.
templ PopupConfigContainer(p ...props.PopupConfigContainer) {
{{ container := props.First(p) }}
<div
if container.ID != "" {
id={ container.ID }
}
x-cloak
class={
tailwind.Merge(
"flex flex-col gap-3 p-0.5 h-full",
container.Class,
),
}
{ container.Attributes... }
>
{ children... }
</div>
}
// PopupConfigFooter provides a footer for sidebar popups used on the Invopop Console UI.
// Deprecated: use Footer component inside an App instead.
templ PopupConfigFooter(p ...props.PopupConfigFooter) {
{{ footer := props.First(p) }}
<div
if footer.ID != "" {
id={ footer.ID }
}
class={
tailwind.Merge(
"flex-1 flex flex-col justify-end w-full",
footer.Class,
),
}
{ footer.Attributes... }
>
<div class="flex justify-end border-t border-border gap-3 p-4">
{ children... }
</div>
</div>
}