Skip to content

armgit / vaul

Public Imported from GitHub
0

A drawer component for React.

SPread props (#112)

Emil Kowalskif5227317b2bb
diff --git a/src/index.tsx b/src/index.tsx
index e85c028..80886af 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -737,7 +737,7 @@ const Content = React.forwardRef<HTMLDivElement, ContentProps>(function (
Content.displayName = 'Drawer.Content';
-function NestedRoot({ children, onDrag, onOpenChange }: DialogProps) {
+function NestedRoot({ children, onDrag, onOpenChange, ...rest }: DialogProps) {
const { onNestedDrag, onNestedOpenChange, onNestedRelease } = useDrawerContext();
if (!onNestedDrag) {
@@ -761,6 +761,7 @@ function NestedRoot({ children, onDrag, onOpenChange }: DialogProps) {
onOpenChange?.(o);
}}
onRelease={onNestedRelease}
+ {...rest}
>
{children}
</Root>