Skip to content

armgit / vaul

Public Imported from GitHub
0

A drawer component for React.

Remove defaultOpen prop, fix incorrect style reset (#95)

Emil Kowalski4d1dd1a2fe2b
diff --git a/src/helpers.ts b/src/helpers.ts
index 17fe73d..517b6a4 100644
--- a/src/helpers.ts
+++ b/src/helpers.ts
@@ -41,7 +41,6 @@ export function reset(el: Element | HTMLElement | null, prop?: string) {
let originalStyles = cache.get(el);
if (!originalStyles) {
- (el.style as any) = {};
return;
}
diff --git a/src/index.tsx b/src/index.tsx
index d3d3245..56f74a3 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -39,7 +39,6 @@ type DialogProps = {
setActiveSnapPoint?: (snapPoint: number | string | null) => void;
children?: React.ReactNode;
open?: boolean;
- defaultOpen?: boolean;
closeThreshold?: number;
onOpenChange?: (open: boolean) => void;
shouldScaleBackground?: boolean;
@@ -55,7 +54,6 @@ type DialogProps = {
function Root({
open: openProp,
- defaultOpen,
onOpenChange,
children,
shouldScaleBackground,