gitscope
← marzneshin / v0.6.5 / dashboard/src/libs/entity-table/components/sidebar-entity-popover.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/libs/entity-table/components/sidebar-entity-popover.tsx · TypeScript
Blame Raw
 1import {
 2    Button,
 3    Popover,
 4    PopoverTrigger,
 5    PopoverContent,
 6} from "@marzneshin/common/components";
 7import {
 8    SidebarEntitySelection
 9} from "@marzneshin/libs/entity-table/components";
10import { FC } from "react";
11
12interface SidebarEntityTablePopoverProps {
13    buttonChild: React.ReactElement;
14}
15
16export const SidebarEntityTablePopover: FC<SidebarEntityTablePopoverProps> = ({
17    buttonChild,
18}) => (
19    <Popover>
20        <PopoverTrigger asChild>
21            <Button
22                size="sm"
23                variant="outline"
24                className="mr-1 lg:flex"
25            >
26                {buttonChild}
27            </Button>
28        </PopoverTrigger>
29        <PopoverContent className="w-80 p-0">
30            <SidebarEntitySelection />
31        </PopoverContent>
32    </Popover>
33)