@sqrzro/ui 4.0.0-alpha.6 → 4.0.0-alpha.7
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.
|
@@ -7,6 +7,9 @@ export interface RootLayoutClassNames {
|
|
|
7
7
|
export interface RootLayoutProps extends ClassNameProps<RootLayoutClassNames> {
|
|
8
8
|
readonly children: React.ReactNode;
|
|
9
9
|
readonly classNameConfig?: RegisteredClassNames;
|
|
10
|
+
readonly font?: {
|
|
11
|
+
variable: string;
|
|
12
|
+
};
|
|
10
13
|
}
|
|
11
|
-
declare function RootLayout({ children, classNameConfig, classNameProps, classNames, }: RootLayoutProps): React.ReactElement;
|
|
14
|
+
declare function RootLayout({ children, classNameConfig, classNameProps, classNames, font, }: RootLayoutProps): React.ReactElement;
|
|
12
15
|
export default RootLayout;
|
|
@@ -2,12 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { getClassNames, registerClassNames } from '../../../styles/config';
|
|
3
3
|
import ClassNames from '../ClassNames';
|
|
4
4
|
import Toaster from '../Toaster';
|
|
5
|
-
function RootLayout({ children, classNameConfig, classNameProps, classNames, }) {
|
|
5
|
+
function RootLayout({ children, classNameConfig, classNameProps, classNames, font, }) {
|
|
6
6
|
if (classNameConfig) {
|
|
7
7
|
registerClassNames(classNameConfig);
|
|
8
8
|
}
|
|
9
9
|
const componentClassNames = classNames || getClassNames('rootLayout')?.(classNameProps);
|
|
10
|
-
return (_jsxs("html", { lang: "en", children: [_jsx("head", { children: _jsx("link", { href: "/images/favicon.svg", rel: "icon" }) }), _jsxs("body", { className: componentClassNames?.root, children: [_jsx("script", { dangerouslySetInnerHTML: {
|
|
10
|
+
return (_jsxs("html", { lang: "en", className: font?.variable, children: [_jsx("head", { children: _jsx("link", { href: "/images/favicon.svg", rel: "icon" }) }), _jsxs("body", { className: componentClassNames?.root, children: [_jsx("script", { dangerouslySetInnerHTML: {
|
|
11
11
|
__html: "(function(d){var v=d.createElement('div'),t=d.createElement('style'),s=v.style;s.overflowY='scroll';s.width='50';s.height='50';d.body.append(v);t.innerHTML='body:has([data-modal][open]){padding-right:'+(v.offsetWidth-v.clientWidth)+'px}';d.body.append(t);v.remove()}(document))",
|
|
12
12
|
} }), classNameConfig ? _jsx(ClassNames, { data: classNameConfig }) : null, _jsx("div", { className: componentClassNames?.content, children: children }), _jsx(Toaster, {})] })] }));
|
|
13
13
|
}
|