mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 04:43:35 +00:00
1849b4d39f
* chore: migrate eslint to oxlint * chore: migrate prettier to oxfmt * chore: migrate typescript * chore: toThrow should have a expected value * chore: cast test value as Day * chore: small title fix * chore: mocks should be hoisted * chore: incorrect async useage * chore: test should be inside description * chore: test sohuld include an expeced * chore: oxfmt --------- Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
29 lines
819 B
TypeScript
29 lines
819 B
TypeScript
import { Popover } from '@base-ui/react/popover';
|
|
import { PropsWithChildren } from 'react';
|
|
|
|
import style from './Popover.module.scss';
|
|
|
|
interface PopoverContentsProps extends Popover.Positioner.Props {
|
|
title?: string;
|
|
className?: string;
|
|
}
|
|
export default function PopoverContents({
|
|
title,
|
|
className,
|
|
children,
|
|
...popoverProps
|
|
}: PropsWithChildren<PopoverContentsProps>) {
|
|
return (
|
|
<Popover.Portal>
|
|
<Popover.Positioner sideOffset={8} {...popoverProps}>
|
|
<Popover.Popup className={style.popup}>
|
|
{title && <Popover.Title className={style.title}>{title}</Popover.Title>}
|
|
<Popover.Description className={className} render={<div />}>
|
|
{children}
|
|
</Popover.Description>
|
|
</Popover.Popup>
|
|
</Popover.Positioner>
|
|
</Popover.Portal>
|
|
);
|
|
}
|