From 58d4f77337d128371f34eaf3f83792e8eea03e64 Mon Sep 17 00:00:00 2001 From: artem ash Date: Fri, 2 Feb 2024 09:35:20 -0800 Subject: [PATCH] @0.2.6: header is options in layout; header has className prop. --- pkgs/luxdefi-ui/common/header/index.tsx | 8 ++++++-- pkgs/luxdefi-ui/next/root-layout.tsx | 8 ++++++-- pkgs/luxdefi-ui/package.json | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/luxdefi-ui/common/header/index.tsx b/pkgs/luxdefi-ui/common/header/index.tsx index efcbe244..a7ecceaa 100644 --- a/pkgs/luxdefi-ui/common/header/index.tsx +++ b/pkgs/luxdefi-ui/common/header/index.tsx @@ -6,12 +6,16 @@ import { type ButtonVariants, LinkElement, DrawerMenu } from '../../primitives' import { NavItems, Icons } from '../../common' import MobileNav from './mobile-nav' +import { cn } from '../../util' + const Header: React.FC<{ siteDef: SiteDef + className?: string }> = ({ - siteDef + siteDef, + className = '' }) => ( -
+
diff --git a/pkgs/luxdefi-ui/next/root-layout.tsx b/pkgs/luxdefi-ui/next/root-layout.tsx index 240efad3..b236eae7 100644 --- a/pkgs/luxdefi-ui/next/root-layout.tsx +++ b/pkgs/luxdefi-ui/next/root-layout.tsx @@ -29,7 +29,11 @@ const viewport = { const bodyClasses = 'bg-background text-foreground ' + getAppRouterBodyFontClasses() -const RootLayout: React.FC = ({ +const RootLayout: React.FC = ({ + header = true, siteDef, children, }) => ( @@ -39,7 +43,7 @@ const RootLayout: React.FC = ({ -
+ {header &&
} {children} diff --git a/pkgs/luxdefi-ui/package.json b/pkgs/luxdefi-ui/package.json index 70527bb1..ffc80555 100644 --- a/pkgs/luxdefi-ui/package.json +++ b/pkgs/luxdefi-ui/package.json @@ -1,6 +1,6 @@ { "name": "@luxdefi/ui", - "version": "0.2.5", + "version": "0.2.6", "description": "Library that contains shared UI primitives, styles, and core types", "publishConfig": { "registry": "https://registry.npmjs.org/",