@manhphi1309/drawer 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -67,7 +67,7 @@ function DrawerClose({ ...props }) {
67
67
  function DrawerOverlay({ className, ...props }) {
68
68
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(vaul.Drawer.Overlay, {
69
69
  "data-slot": "drawer-overlay",
70
- className: (0, _manhphi1309_utils.cn)("fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
70
+ className: (0, _manhphi1309_utils.cn)("fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
71
71
  ...props
72
72
  });
73
73
  }
@@ -82,15 +82,15 @@ function DrawerContent({ className, children, ...props }) {
82
82
  })]
83
83
  });
84
84
  }
85
- function DrawerHeader({ className, leftNode, rightNode, children, ...props }) {
86
- if (leftNode || rightNode) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
85
+ function DrawerHeader({ className, leftAction, rightAction, children, ...props }) {
86
+ if (leftAction || rightAction) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
87
87
  "data-slot": "drawer-header",
88
88
  className: (0, _manhphi1309_utils.cn)("grid grid-cols-[1fr_auto_1fr] items-center gap-2 px-4 py-2", className),
89
89
  ...props,
90
90
  children: [
91
91
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
92
92
  className: "flex justify-start",
93
- children: leftNode
93
+ children: leftAction
94
94
  }),
95
95
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
96
96
  className: "flex flex-col gap-0.5 text-center",
@@ -98,7 +98,7 @@ function DrawerHeader({ className, leftNode, rightNode, children, ...props }) {
98
98
  }),
99
99
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
100
100
  className: "flex justify-end",
101
- children: rightNode
101
+ children: rightAction
102
102
  })
103
103
  ]
104
104
  });
package/dist/index.d.cts CHANGED
@@ -25,13 +25,13 @@ declare function DrawerContent({
25
25
  }: React.ComponentProps<typeof Drawer$1.Content>): React.JSX.Element;
26
26
  declare function DrawerHeader({
27
27
  className,
28
- leftNode,
29
- rightNode,
28
+ leftAction,
29
+ rightAction,
30
30
  children,
31
31
  ...props
32
32
  }: React.ComponentProps<"div"> & {
33
- leftNode?: React.ReactNode;
34
- rightNode?: React.ReactNode;
33
+ leftAction?: React.ReactNode;
34
+ rightAction?: React.ReactNode;
35
35
  }): React.JSX.Element;
36
36
  declare function DrawerFooter({
37
37
  className,
package/dist/index.d.mts CHANGED
@@ -25,13 +25,13 @@ declare function DrawerContent({
25
25
  }: React.ComponentProps<typeof Drawer$1.Content>): React.JSX.Element;
26
26
  declare function DrawerHeader({
27
27
  className,
28
- leftNode,
29
- rightNode,
28
+ leftAction,
29
+ rightAction,
30
30
  children,
31
31
  ...props
32
32
  }: React.ComponentProps<"div"> & {
33
- leftNode?: React.ReactNode;
34
- rightNode?: React.ReactNode;
33
+ leftAction?: React.ReactNode;
34
+ rightAction?: React.ReactNode;
35
35
  }): React.JSX.Element;
36
36
  declare function DrawerFooter({
37
37
  className,
package/dist/index.mjs CHANGED
@@ -43,7 +43,7 @@ function DrawerClose({ ...props }) {
43
43
  function DrawerOverlay({ className, ...props }) {
44
44
  return /* @__PURE__ */ jsx(Drawer$1.Overlay, {
45
45
  "data-slot": "drawer-overlay",
46
- className: cn("fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
46
+ className: cn("fixed inset-0 z-50 bg-black/40 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
47
47
  ...props
48
48
  });
49
49
  }
@@ -58,15 +58,15 @@ function DrawerContent({ className, children, ...props }) {
58
58
  })]
59
59
  });
60
60
  }
61
- function DrawerHeader({ className, leftNode, rightNode, children, ...props }) {
62
- if (leftNode || rightNode) return /* @__PURE__ */ jsxs("div", {
61
+ function DrawerHeader({ className, leftAction, rightAction, children, ...props }) {
62
+ if (leftAction || rightAction) return /* @__PURE__ */ jsxs("div", {
63
63
  "data-slot": "drawer-header",
64
64
  className: cn("grid grid-cols-[1fr_auto_1fr] items-center gap-2 px-4 py-2", className),
65
65
  ...props,
66
66
  children: [
67
67
  /* @__PURE__ */ jsx("div", {
68
68
  className: "flex justify-start",
69
- children: leftNode
69
+ children: leftAction
70
70
  }),
71
71
  /* @__PURE__ */ jsx("div", {
72
72
  className: "flex flex-col gap-0.5 text-center",
@@ -74,7 +74,7 @@ function DrawerHeader({ className, leftNode, rightNode, children, ...props }) {
74
74
  }),
75
75
  /* @__PURE__ */ jsx("div", {
76
76
  className: "flex justify-end",
77
- children: rightNode
77
+ children: rightAction
78
78
  })
79
79
  ]
80
80
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manhphi1309/drawer",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "sideEffects": false,
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",