Skip to content

Commit 2a98654

Browse files
fix: remove set ref
1 parent ad6b721 commit 2a98654

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

apps/showcase/demo/headless/drawer/basic-demo.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const navItems = [
1515
];
1616

1717
export default function BasicDemo() {
18-
const { triggerProps, backdropProps, popupProps, closeProps, headerProps, rootProps, backdropMotionProps, setMaskRef, state } = useDrawer();
18+
const { triggerProps, backdropProps, popupProps, closeProps, headerProps, rootProps, backdropMotionProps, state } = useDrawer();
1919
const portal = usePortal();
2020

2121
const popupRef = React.useRef<HTMLDivElement>(null);
@@ -34,7 +34,6 @@ export default function BasicDemo() {
3434

3535
const backdropMotion = useMotion({
3636
...backdropMotionProps.motionProps,
37-
elementRef: setMaskRef,
3837
visible: backdropMotionProps.visible,
3938
enterFromClassName: 'opacity-0',
4039
enterActiveClassName: 'transition-opacity duration-200',
@@ -57,7 +56,7 @@ export default function BasicDemo() {
5756
popupMotion.state.rendered &&
5857
createPortal(
5958
<div className="fixed inset-0 z-1100">
60-
{backdropMotion.state.rendered && <div ref={setMaskRef} {...backdropProps} className="fixed inset-0 bg-black/50" />}
59+
{backdropMotion.state.rendered && <div {...backdropProps} className="fixed inset-0 bg-black/50" />}
6160
{popupMotion.state.rendered && (
6261
<div
6362
{...popupProps}

0 commit comments

Comments
 (0)