non-modal dropdown menus (#11649)

This commit is contained in:
Josh Hawkins 2024-05-30 08:39:14 -05:00 committed by GitHub
parent 1c2e2a7b38
commit 9cb3e11df6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 8 additions and 5 deletions

View File

@ -468,7 +468,7 @@ export function CameraGroupRow({
{isMobile && ( {isMobile && (
<> <>
<DropdownMenu> <DropdownMenu modal={false}>
<DropdownMenuTrigger> <DropdownMenuTrigger>
<HiOutlineDotsVertical className="size-5" /> <HiOutlineDotsVertical className="size-5" />
</DropdownMenuTrigger> </DropdownMenuTrigger>

View File

@ -365,6 +365,7 @@ export function CamerasFilterButton({
return ( return (
<DropdownMenu <DropdownMenu
modal={false}
open={open} open={open}
onOpenChange={(open) => { onOpenChange={(open) => {
if (!open) { if (!open) {

View File

@ -34,7 +34,7 @@ export default function AccountSettings({ className }: AccountSettingsProps) {
const MenuItem = isDesktop ? DropdownMenuItem : DialogClose; const MenuItem = isDesktop ? DropdownMenuItem : DialogClose;
return ( return (
<Container> <Container modal={!isDesktop}>
<Trigger> <Trigger>
<Tooltip> <Tooltip>
<TooltipTrigger asChild> <TooltipTrigger asChild>

View File

@ -114,7 +114,7 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
return ( return (
<> <>
<Container> <Container modal={!isDesktop}>
<Trigger> <Trigger>
<Tooltip> <Tooltip>
<TooltipTrigger asChild> <TooltipTrigger asChild>

View File

@ -230,6 +230,7 @@ export default function VideoControls({
)} )}
{features.playbackRate && ( {features.playbackRate && (
<DropdownMenu <DropdownMenu
modal={false}
onOpenChange={(open) => { onOpenChange={(open) => {
if (setControlsOpen) { if (setControlsOpen) {
setControlsOpen(open); setControlsOpen(open);

View File

@ -266,7 +266,7 @@ export default function PolygonItem({
{isMobile && ( {isMobile && (
<> <>
<DropdownMenu> <DropdownMenu modal={false}>
<DropdownMenuTrigger> <DropdownMenuTrigger>
<HiOutlineDotsVertical className="size-5" /> <HiOutlineDotsVertical className="size-5" />
</DropdownMenuTrigger> </DropdownMenuTrigger>

View File

@ -284,6 +284,7 @@ function CameraSelectButton({
return ( return (
<DropdownMenu <DropdownMenu
modal={false}
open={open} open={open}
onOpenChange={(open: boolean) => { onOpenChange={(open: boolean) => {
if (!open) { if (!open) {

View File

@ -583,7 +583,7 @@ function PtzControlPanel({
</> </>
)} )}
{(ptz?.presets?.length ?? 0) > 0 && ( {(ptz?.presets?.length ?? 0) > 0 && (
<DropdownMenu> <DropdownMenu modal={false}>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<Button> <Button>
<BsThreeDotsVertical /> <BsThreeDotsVertical />