diff --git a/apps/web/src/components/shell/SiteHeader/SiteHeader.css b/apps/web/src/components/shell/SiteHeader/SiteHeader.css index 89a550b..9dabf39 100644 --- a/apps/web/src/components/shell/SiteHeader/SiteHeader.css +++ b/apps/web/src/components/shell/SiteHeader/SiteHeader.css @@ -19,30 +19,10 @@ display: inline-flex; flex: 0 0 auto; align-items: center; - gap: var(--space-3); - color: var(--color-text-primary); - font-size: var(--font-size-lg); - font-weight: var(--font-weight-bold); + margin-right: var(--space-3); text-decoration: none; } - .brand:hover { - color: var(--color-text-primary); - } - - .brand__mark { - display: grid; - flex: 0 0 auto; - place-items: center; - width: 2.25rem; - height: 2.25rem; - border-radius: var(--radius-md); - color: var(--color-text-inverse); - background-color: var(--color-brand-primary); - font-family: Georgia, serif; - font-size: var(--font-size-xl); - } - .site-header__controls { display: flex; flex: 1 1 auto; @@ -56,7 +36,7 @@ .account-navigation { display: flex; align-items: center; - gap: var(--space-2); + gap: var(--space-4); } .primary-navigation__link, @@ -180,6 +160,6 @@ display: inline-flex; align-items: center; gap: var(--space-2); - font-weight: 600; + font-weight: var(--font-weight-semibold); } } diff --git a/apps/web/src/components/shell/SiteHeader/SiteHeader.tsx b/apps/web/src/components/shell/SiteHeader/SiteHeader.tsx index d32c1b4..402b17f 100644 --- a/apps/web/src/components/shell/SiteHeader/SiteHeader.tsx +++ b/apps/web/src/components/shell/SiteHeader/SiteHeader.tsx @@ -12,11 +12,14 @@ import { useAppStore } from '../../../store'; import Button from '../../ui/Button/Button'; import IconButton from '../../ui/IconButton/IconButton'; import './SiteHeader.css'; +import LogoMark from '../../brand/LogoMark/LogoMark'; +import LinkButton from '../../ui/LinkButton/LinkButton'; +import { Icon } from '../../ui/Icon/Icon'; const pages = [ - ['/', 'Explore', HomeIcon], - ['/cookbook', 'My Cookbook', CookbookIcon], - ['/recipes/new', 'Add Recipe', AddRecipeIcon], + { to: '/', label: 'Explore', icon: HomeIcon }, + { to: '/cookbook', label: 'My Cookbook', icon: CookbookIcon }, + { to: '/recipes/new', label: 'Add Recipe', icon: AddRecipeIcon }, ] as const; function SiteHeader() { @@ -37,11 +40,13 @@ function SiteHeader() { return (
- - - Recipe Platform + + - +
diff --git a/apps/web/src/components/ui/LinkButton/LinkButton.tsx b/apps/web/src/components/ui/LinkButton/LinkButton.tsx index ee891c0..a1365af 100644 --- a/apps/web/src/components/ui/LinkButton/LinkButton.tsx +++ b/apps/web/src/components/ui/LinkButton/LinkButton.tsx @@ -1,14 +1,16 @@ import type { ReactNode } from 'react'; -import { Link, type LinkProps } from 'react-router-dom'; +import { NavLink, type NavLinkProps } from 'react-router-dom'; import type { ButtonSize, ButtonVariant } from '../Button/Button'; import '../Button/Button.css'; -export type LinkButtonProps = LinkProps & { +export type LinkButtonProps = Omit & { children: ReactNode; variant?: ButtonVariant; size?: ButtonSize; wide?: boolean; + className?: string; + activeClassName?: string; }; function LinkButton({ @@ -17,22 +19,27 @@ function LinkButton({ size = 'md', wide = false, className = '', + activeClassName = '', ...props }: LinkButtonProps) { - const classes = [ - 'button', - `button--${variant}`, - `button--${size}`, - wide && 'button--wide', - className, - ] - .filter(Boolean) - .join(' '); - return ( - + + [ + 'button', + `button--${variant}`, + `button--${size}`, + wide && 'button--wide', + className, + isActive && activeClassName, + ] + .filter(Boolean) + .join(' ') + } + {...props} + > {children} - + ); }