From 2a28f5bfdb7bc1bf6d3637415093f72efb7b2e65 Mon Sep 17 00:00:00 2001 From: Bela Bohlender Date: Tue, 19 Mar 2024 18:35:24 +0100 Subject: [PATCH] fix: #23 - hitbox for close button incorrect --- examples/dashboard/src/App.tsx | 4 +++- examples/dashboard/src/components/UserNav.tsx | 5 +--- examples/uikit/src/App.tsx | 4 ---- packages/kits/default/dialog.tsx | 3 +++ packages/uikit/src/components/custom.tsx | 24 ++++++++++--------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/dashboard/src/App.tsx b/examples/dashboard/src/App.tsx index d514a3fb..8829c5b2 100644 --- a/examples/dashboard/src/App.tsx +++ b/examples/dashboard/src/App.tsx @@ -8,7 +8,7 @@ import { Button } from '@/button' import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/card' import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/tabs' import { DialogAnchor } from '@/dialog' - +import { noEvents, XWebPointers } from '@coconut-xr/xinteraction/react' import { CalendarDateRangePicker } from './components/DateRangePicker' import { MainNav } from './components/MainNav' import { Overview } from './components/Overview' @@ -22,11 +22,13 @@ export default function App() { const [open, setOpen] = useState(false) return ( + diff --git a/examples/dashboard/src/components/UserNav.tsx b/examples/dashboard/src/components/UserNav.tsx index 3c8d7df3..94a1bd8a 100644 --- a/examples/dashboard/src/components/UserNav.tsx +++ b/examples/dashboard/src/components/UserNav.tsx @@ -1,4 +1,4 @@ -import { Text, Container, CustomContainer } from '@react-three/uikit' +import { Text, Container } from '@react-three/uikit' import { BellRing } from '@react-three/uikit-lucide' import { Avatar } from '@/avatar' import { Button } from '@/button' @@ -36,9 +36,6 @@ export function UserNav({ open, setOpen }: { open: boolean; setOpen: (open: bool - - - Edit profile diff --git a/examples/uikit/src/App.tsx b/examples/uikit/src/App.tsx index 4f7551f4..7f3bcfea 100644 --- a/examples/uikit/src/App.tsx +++ b/examples/uikit/src/App.tsx @@ -6,7 +6,6 @@ import { DefaultProperties, Container, Content, - CustomContainer, Svg, Text, Image, @@ -84,9 +83,6 @@ export default function App() { width={300} height={100} /> - - - ) return ( e.stopPropagation()} + onPointerEnter={(e) => e.stopPropagation()} + onPointerLeave={(e) => e.stopPropagation()} onWheel={(e) => e.stopPropagation()} positionType="absolute" inset={0} @@ -169,6 +171,7 @@ export function DialogContent({ children, sm, ...props }: ComponentPropsWithoutR onClick={close} cursor="pointer" positionType="absolute" + zIndexOffset={50} positionRight={16} positionTop={16} borderRadius={2} diff --git a/packages/uikit/src/components/custom.tsx b/packages/uikit/src/components/custom.tsx index 8541a46b..79d21018 100644 --- a/packages/uikit/src/components/custom.tsx +++ b/packages/uikit/src/components/custom.tsx @@ -114,17 +114,19 @@ export const CustomContainer = forwardRef< hoverHandlers={hoverHandlers} activeHandlers={activeHandlers} > - - {properties.children} - + + + {properties.children} + + ) })