mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-03-09 21:50:36 +00:00
* fix: docker prod env variable fix * lint and typecheck * removed hardcoded tag * better summary generation * improved summary generation for context optimization * remove think tags from the generation
30 lines
842 B
TypeScript
30 lines
842 B
TypeScript
import * as Popover from '@radix-ui/react-popover';
|
|
import type { PropsWithChildren, ReactNode } from 'react';
|
|
|
|
export default ({
|
|
children,
|
|
trigger,
|
|
side,
|
|
align,
|
|
}: PropsWithChildren<{
|
|
trigger: ReactNode;
|
|
side: 'top' | 'right' | 'bottom' | 'left' | undefined;
|
|
align: 'center' | 'start' | 'end' | undefined;
|
|
}>) => (
|
|
<Popover.Root>
|
|
<Popover.Trigger asChild>{trigger}</Popover.Trigger>
|
|
<Popover.Anchor />
|
|
<Popover.Portal>
|
|
<Popover.Content
|
|
sideOffset={10}
|
|
side={side}
|
|
align={align}
|
|
className="bg-bolt-elements-background-depth-2 text-bolt-elements-item-contentAccent p-2 rounded-md shadow-xl z-workbench"
|
|
>
|
|
{children}
|
|
<Popover.Arrow className="bg-bolt-elements-item-background-depth-2" />
|
|
</Popover.Content>
|
|
</Popover.Portal>
|
|
</Popover.Root>
|
|
);
|