@uxf/ui 11.47.0 → 11.47.1
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/css/layout.css +2 -2
- package/layout/layout.d.ts +2 -0
- package/layout/layout.js +3 -2
- package/package.json +1 -1
package/css/layout.css
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.uxf-app-bar {
|
|
32
|
-
background-color:
|
|
32
|
+
background-color: var(--uxf-layout-app-bar-background-color);
|
|
33
33
|
border-bottom: var(--uxf-layout-app-bar-border-width) solid var(--uxf-layout-app-bar-border-color);
|
|
34
34
|
display: flex;
|
|
35
35
|
height: var(--uxf-layout-app-bar-height);
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.uxf-sidebar {
|
|
63
|
-
background-color:
|
|
63
|
+
background-color: var(--uxf-layout-sidebar-background-color);
|
|
64
64
|
border-right: var(--uxf-layout-sidebar-border-width) solid var(--uxf-layout-sidebar-border-color);
|
|
65
65
|
bottom: 0;
|
|
66
66
|
display: none;
|
package/layout/layout.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export interface LayoutProps {
|
|
|
4
4
|
sidebar?: ReactNode;
|
|
5
5
|
sidebarHeader?: ReactNode;
|
|
6
6
|
appBar?: ReactNode;
|
|
7
|
+
classNameAppBar?: string;
|
|
8
|
+
className?: string;
|
|
7
9
|
}
|
|
8
10
|
export declare function Layout(props: LayoutProps): React.JSX.Element;
|
|
9
11
|
export declare namespace Layout {
|
package/layout/layout.js
CHANGED
|
@@ -29,13 +29,14 @@ const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
|
|
29
29
|
const react_1 = __importStar(require("react"));
|
|
30
30
|
const icon_button_1 = require("../icon-button");
|
|
31
31
|
function Layout(props) {
|
|
32
|
+
var _a, _b;
|
|
32
33
|
const [isSidebarOpen, setIsSidebarOpen] = (0, react_1.useState)(false);
|
|
33
|
-
return (react_1.default.createElement("div", { className:
|
|
34
|
+
return (react_1.default.createElement("div", { className: `uxf-layout ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}` },
|
|
34
35
|
react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-sidebar", isSidebarOpen && "uxf-sidebar--is-open") },
|
|
35
36
|
(0, is_not_nil_1.isNotNil)(props.sidebarHeader) && react_1.default.createElement("div", { className: "uxf-sidebar__header" }, props.sidebarHeader),
|
|
36
37
|
react_1.default.createElement("div", { className: "uxf-sidebar__content" }, props.sidebar)),
|
|
37
38
|
isSidebarOpen && react_1.default.createElement("div", { className: "uxf-sidebar-overlay", onClick: () => setIsSidebarOpen(false) }),
|
|
38
|
-
react_1.default.createElement("div", { className:
|
|
39
|
+
react_1.default.createElement("div", { className: `uxf-app-bar ${(_b = props.classNameAppBar) !== null && _b !== void 0 ? _b : ""}` },
|
|
39
40
|
react_1.default.createElement(icon_button_1.IconButton, { className: "uxf-app-bar__menu-button", iconName: "bars", label: "Otev\u0159\u00EDt menu", onClick: () => setIsSidebarOpen(true), variant: "text" }),
|
|
40
41
|
react_1.default.createElement("div", { className: "uxf-app-bar__content" }, props.appBar)),
|
|
41
42
|
react_1.default.createElement("main", { className: "uxf-layout__content" }, props.children)));
|