mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-22 19:40:57 -05:00
* Initial * Progress * Fix * Progress * Notifications list page * BADGE_MANAGER_ADDED * Mark as seen initial * Split tables * Progress * Fix styles * Push notifs initial * Progress * Rename * Routines * Progress * Add e2e tests * Done? * Try updating actions * Consistency * Dep fix * A couple fixes
37 lines
696 B
TypeScript
37 lines
696 B
TypeScript
import clsx from "clsx";
|
|
import {
|
|
Dialog,
|
|
DialogTrigger,
|
|
Popover,
|
|
type PopoverProps,
|
|
} from "react-aria-components";
|
|
|
|
export function SendouPopover({
|
|
children,
|
|
trigger,
|
|
popoverClassName,
|
|
placement,
|
|
onOpenChange,
|
|
isOpen,
|
|
}: {
|
|
children: React.ReactNode;
|
|
trigger: React.ReactNode;
|
|
popoverClassName?: string;
|
|
placement?: PopoverProps["placement"];
|
|
onOpenChange?: PopoverProps["onOpenChange"];
|
|
isOpen?: boolean;
|
|
}) {
|
|
return (
|
|
<DialogTrigger isOpen={isOpen}>
|
|
{trigger}
|
|
<Popover
|
|
className={clsx("sendou-popover-content", popoverClassName)}
|
|
placement={placement}
|
|
onOpenChange={onOpenChange}
|
|
>
|
|
<Dialog>{children}</Dialog>
|
|
</Popover>
|
|
</DialogTrigger>
|
|
);
|
|
}
|