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 && (
<>
<DropdownMenu>
<DropdownMenu modal={false}>
<DropdownMenuTrigger>
<HiOutlineDotsVertical className="size-5" />
</DropdownMenuTrigger>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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