@manhphi1309/drawer 0.2.5 → 0.2.6
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 +2 -2
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -172,10 +172,10 @@ function DrawerContent({ className, children, panels, activePanelIndex = 0, onPa
|
|
|
172
172
|
})
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
function DrawerHeader({ className, leftAction, rightAction, children, ...props }) {
|
|
175
|
+
function DrawerHeader({ className, leftAction, rightAction, withSeparator = false, children, ...props }) {
|
|
176
176
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
177
177
|
"data-slot": "drawer-header",
|
|
178
|
-
className: (0, _manhphi1309_utils.cn)("flex items-center px-4 py-2 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left", className),
|
|
178
|
+
className: (0, _manhphi1309_utils.cn)("flex items-center px-4 py-2 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left", withSeparator && "border-b border-border", className),
|
|
179
179
|
...props,
|
|
180
180
|
children: leftAction || rightAction ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
181
181
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
package/dist/index.d.cts
CHANGED
|
@@ -42,11 +42,13 @@ declare function DrawerHeader({
|
|
|
42
42
|
className,
|
|
43
43
|
leftAction,
|
|
44
44
|
rightAction,
|
|
45
|
+
withSeparator,
|
|
45
46
|
children,
|
|
46
47
|
...props
|
|
47
48
|
}: React.ComponentProps<"div"> & {
|
|
48
49
|
leftAction?: React.ReactNode;
|
|
49
50
|
rightAction?: React.ReactNode;
|
|
51
|
+
withSeparator?: boolean;
|
|
50
52
|
}): React.JSX.Element;
|
|
51
53
|
declare function DrawerFooter({
|
|
52
54
|
className,
|
package/dist/index.d.mts
CHANGED
|
@@ -42,11 +42,13 @@ declare function DrawerHeader({
|
|
|
42
42
|
className,
|
|
43
43
|
leftAction,
|
|
44
44
|
rightAction,
|
|
45
|
+
withSeparator,
|
|
45
46
|
children,
|
|
46
47
|
...props
|
|
47
48
|
}: React.ComponentProps<"div"> & {
|
|
48
49
|
leftAction?: React.ReactNode;
|
|
49
50
|
rightAction?: React.ReactNode;
|
|
51
|
+
withSeparator?: boolean;
|
|
50
52
|
}): React.JSX.Element;
|
|
51
53
|
declare function DrawerFooter({
|
|
52
54
|
className,
|
package/dist/index.mjs
CHANGED
|
@@ -148,10 +148,10 @@ function DrawerContent({ className, children, panels, activePanelIndex = 0, onPa
|
|
|
148
148
|
})
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
|
-
function DrawerHeader({ className, leftAction, rightAction, children, ...props }) {
|
|
151
|
+
function DrawerHeader({ className, leftAction, rightAction, withSeparator = false, children, ...props }) {
|
|
152
152
|
return /* @__PURE__ */ jsx("div", {
|
|
153
153
|
"data-slot": "drawer-header",
|
|
154
|
-
className: cn("flex items-center px-4 py-2 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left", className),
|
|
154
|
+
className: cn("flex items-center px-4 py-2 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:text-left", withSeparator && "border-b border-border", className),
|
|
155
155
|
...props,
|
|
156
156
|
children: leftAction || rightAction ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
157
157
|
/* @__PURE__ */ jsx("div", {
|