Skip to content

Commit

Permalink
header tweaks (#57)
Browse files Browse the repository at this point in the history
# Problem
Update styling for header

# Solution
- updated styling for header


Co-authored-by: Claire Olmstead <olmsteadclaire@gmail.com>
  • Loading branch information
claireolmstead and claireolmstead authored Nov 15, 2024
1 parent a3a8768 commit 3b4c815
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/lib/features/Header.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
<Meta title="UI Components/Features/Header" component={Header} />

<!--Primary-->
<Story name="Header" id="header">
<Story name="Primary" id="primary">
<Header {menuItems} class="fixed left-0 top-0 w-full" />
</Story>

<!--Logo Link-->
<Story name="LogoLink">
<Header {menuItems} class="fixed left-0 top-0 w-full" logoLink="/" />
</Story>
9 changes: 5 additions & 4 deletions src/lib/features/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
import NavMenuMobile from './NavMenuMobile.svelte';
import { MenuItem } from '$lib/utils/types.js';
export let logoLink = '';
export let menuItems: MenuItem[] = [];
export let highlightMarginTop = '90px';
</script>

<div class={`header-shadow flex h-[85px] font-title ${$$restProps.class}`}>
<div class="m-auto flex h-[85px] w-full max-w-screen-lg items-stretch justify-around sm:px-f20 md:px-f32">
<div class="m-auto flex h-[85px] w-full max-w-screen-xl justify-between sm:px-f20 md:px-f32">
<!-- For Desktop -->
<div class="flex w-[146px] items-center text-teal md:w-[200px]">
<FrequencyLogo />
</div>
<a href={logoLink} class={`self-center ${logoLink ? '' : 'pointer-events-none'}`}>
<FrequencyLogo class="w-[146px] text-teal md:w-[200px]" />
</a>

<NavMenu {highlightMarginTop} {menuItems} />
<!-- For Mobile -->
Expand Down
2 changes: 1 addition & 1 deletion src/lib/features/NavMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
});
</script>

<nav class="hidden items-stretch gap-f40 md:flex">
<nav class="hidden gap-f32 text-navy md:flex">
{#each menuItems as item}
{#if item.isButton}
<div class="content-center">
Expand Down

0 comments on commit 3b4c815

Please sign in to comment.