@rovula/ui 0.0.25 → 0.0.26
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/cjs/bundle.js +1 -1
- package/dist/cjs/bundle.js.map +1 -1
- package/dist/cjs/types/components/Navbar/Navbar.d.ts +4 -0
- package/dist/cjs/types/components/Navbar/Navbar.stories.d.ts +4 -0
- package/dist/components/Navbar/Navbar.js +2 -2
- package/dist/esm/bundle.js +1 -1
- package/dist/esm/bundle.js.map +1 -1
- package/dist/esm/types/components/Navbar/Navbar.d.ts +4 -0
- package/dist/esm/types/components/Navbar/Navbar.stories.d.ts +4 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
- package/src/components/Navbar/Navbar.tsx +33 -6
|
@@ -7,6 +7,10 @@ export type NavbarProps = {
|
|
|
7
7
|
center?: ReactNode;
|
|
8
8
|
container?: boolean;
|
|
9
9
|
className?: string;
|
|
10
|
+
containerClassName?: string;
|
|
11
|
+
leftNavClassName?: string;
|
|
12
|
+
centerClassName?: string;
|
|
13
|
+
rightNavClassName?: string;
|
|
10
14
|
};
|
|
11
15
|
declare const Navbar: FC<NavbarProps>;
|
|
12
16
|
export default Navbar;
|
|
@@ -14,6 +14,10 @@ declare const meta: {
|
|
|
14
14
|
center?: React.ReactNode;
|
|
15
15
|
container?: boolean | undefined;
|
|
16
16
|
className?: string | undefined;
|
|
17
|
+
containerClassName?: string | undefined;
|
|
18
|
+
leftNavClassName?: string | undefined;
|
|
19
|
+
centerClassName?: string | undefined;
|
|
20
|
+
rightNavClassName?: string | undefined;
|
|
17
21
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
18
22
|
};
|
|
19
23
|
export default meta;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "@/utils/cn";
|
|
3
|
-
const Navbar = ({ children, className, center, leftNav, rightNav, position, container = false, }) => {
|
|
3
|
+
const Navbar = ({ children, className, center, leftNav, rightNav, position, container = false, containerClassName, leftNavClassName, centerClassName, rightNavClassName, }) => {
|
|
4
4
|
return (_jsx("header", { className: cn("w-full px-4 py-6 h-[var(--navbar-height)] box-border overflow-hidden typography-subtitile2 border-solid border-b-2 bg-[rgb(var(--navbar-bg-color))] text-[rgb(var(--navbar-text-color))] border-b-[rgb(var(--navbar-border-color))]", { position }, className), children: _jsx("div", { className: cn("mx-auto flex h-full justify-between items-center", {
|
|
5
5
|
container,
|
|
6
|
-
}), children: children || (_jsxs(_Fragment, { children: [_jsx("nav", { className: "flex w-1/2 gap-x-[var(--navbar-gap)] text-xl", children: leftNav }), _jsx("div", { className: "flex flex-shrink-0 flex-wrap justify-center", children: center }), _jsx("nav", { className: "flex w-1/2 justify-end gap-x-[var(--navbar-gap)] text-xl", children: rightNav })] })) }) }));
|
|
6
|
+
}, containerClassName), children: children || (_jsxs(_Fragment, { children: [_jsx("nav", { className: cn("flex w-1/2 gap-x-[var(--navbar-gap)] text-xl", leftNavClassName), children: leftNav }), _jsx("div", { className: cn("flex flex-shrink-0 flex-wrap justify-center", centerClassName), children: center }), _jsx("nav", { className: cn("flex w-1/2 justify-end gap-x-[var(--navbar-gap)] text-xl", rightNavClassName), children: rightNav })] })) }) }));
|
|
7
7
|
};
|
|
8
8
|
export default Navbar;
|