@smitch/fluid
Version:
A Next/React ui-component libray.
11 lines (10 loc) • 1.2 kB
JavaScript
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { twMerge } from 'tailwind-merge';
import NavLinks from './NavLinks';
import NavBrand from './NavBrand';
var NavBar = function (_a) {
var brand = _a.brand, brandSrc = _a.brandSrc, brandStyles = _a.brandStyles, links = _a.links, linkStyles = _a.linkStyles, _b = _a.btnBackground, btnBackground = _b === void 0 ? 'info' : _b, btnColor = _a.btnColor, btnLayout = _a.btnLayout, btnSize = _a.btnSize, children = _a.children, _c = _a.navStyles, navStyles = _c === void 0 ? 'bg-slate-200 dark:bg-slate-600' : _c, onLinkClick = _a.onLinkClick;
return (_jsxs("nav", { className: twMerge("shadow-lg fixed top-0 left-0 w-full z-10 flex justify-between items-center px-4 py-2", navStyles), children: [brand ? (_jsx(NavBrand, { brand: brand, src: brandSrc, brandStyles: brandStyles })) : (_jsx("div", {})), _jsxs("div", { className: 'flex flex-row-reverse lg:flex-row items-center gap-4', children: [_jsx(NavLinks, { links: links, linkStyles: linkStyles, btnBackground: btnBackground, btnColor: btnColor, btnLayout: btnLayout, btnSize: btnSize, onLinkClick: onLinkClick }), children] })] }));
};
export default NavBar;