@skalfa/skalfa-component 1.0.42 → 1.0.43
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.
|
@@ -26,6 +26,7 @@ export interface sidebarProps {
|
|
|
26
26
|
className?: string;
|
|
27
27
|
}
|
|
28
28
|
export declare function SidebarComponent({ id, head, footer, items, basePath, prefetch, className, }: sidebarProps): import("@types/react").JSX.Element;
|
|
29
|
-
export declare function SidebarContentComponent({ children }: {
|
|
29
|
+
export declare function SidebarContentComponent({ children, id }: {
|
|
30
30
|
children: ReactNode;
|
|
31
|
+
id: string;
|
|
31
32
|
}): import("@types/react").JSX.Element;
|
|
@@ -79,6 +79,7 @@ function SidebarComponent({ id, head, footer, items, basePath, prefetch, classNa
|
|
|
79
79
|
})] }) }, menu_head_key));
|
|
80
80
|
}) }), (0, jsx_runtime_1.jsx)("div", { className: toggle[`SIDEBAR${id ? "" : "_" + id?.toUpperCase()}`] ? "block" : "hidden lg:block", children: footer })] })] }));
|
|
81
81
|
}
|
|
82
|
-
function SidebarContentComponent({ children }) {
|
|
83
|
-
|
|
82
|
+
function SidebarContentComponent({ children, id }) {
|
|
83
|
+
const { toggle } = (0, _contexts_1.useToggleContext)();
|
|
84
|
+
return ((0, jsx_runtime_1.jsx)("main", { className: (0, _utils_1.cn)("sidebar-main-content", toggle[`SIDEBAR${id ? "" : "_" + id?.toUpperCase()}`] ? "sidebar-main-content-active" : "sidebar-main-content-inactive"), children: children }));
|
|
84
85
|
}
|
package/package.json
CHANGED
|
@@ -305,9 +305,11 @@ export function SidebarComponent({
|
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
export function SidebarContentComponent({ children }: { children: ReactNode }) {
|
|
308
|
+
export function SidebarContentComponent({ children, id }: { children: ReactNode, id: string }) {
|
|
309
|
+
const { toggle } = useToggleContext()
|
|
310
|
+
|
|
309
311
|
return (
|
|
310
|
-
<main className="
|
|
312
|
+
<main className={cn("sidebar-main-content", toggle[`SIDEBAR${id ? "" : "_" + id?.toUpperCase()}`] ? "sidebar-main-content-active" : "sidebar-main-content-inactive")}>
|
|
311
313
|
{children}
|
|
312
314
|
</main>
|
|
313
315
|
);
|