Skip to content

Commit 6de848b

Browse files
feat(popover): add info popover
1 parent 8ddd2ec commit 6de848b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { mdiInformationOutline } from "@mdi/js"
2+
import { ttt } from "~ui/i18n/ttt"
3+
import { buttonSize, buttonVariant } from "~ui/interactive/button/buttonCva"
4+
import { CorvuPopover } from "~ui/interactive/popover/CorvuPopover"
5+
import type { HasChildren } from "~ui/utils/HasChildren"
6+
import type { MayHaveClass } from "~ui/utils/MayHaveClass"
7+
8+
export interface InfoPopoverProps extends MayHaveClass, HasChildren {}
9+
10+
export function InfoPopover(p: InfoPopoverProps) {
11+
return (
12+
<CorvuPopover
13+
icon={mdiInformationOutline}
14+
iconClass="size-5 fill-gray-500"
15+
variant={buttonVariant.ghost}
16+
title={ttt("More Information")}
17+
size={buttonSize.minimal}
18+
class={p.class ?? "ml-2"}
19+
>
20+
{p.children}
21+
</CorvuPopover>
22+
)
23+
}

0 commit comments

Comments
 (0)