Skip to content

Commit

Permalink
Button active state is special for header (#60)
Browse files Browse the repository at this point in the history
# Problem

- The button should always hover black text
- The active state on the header should be navy
  • Loading branch information
wilwade authored Nov 15, 2024
1 parent 1cd5ac4 commit b6d97ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/atoms/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// Define button type classes
$: typeClass =
type === 'primary'
? 'bg-teal text-black hover:bg-tealDark hover:shadow-md'
? 'bg-teal text-black hover:text-black hover:bg-tealDark hover:shadow-md'
: 'bg-transparent border text-white border-white hover:border-primary hover:text-primary';
// Define classes
Expand Down
4 changes: 2 additions & 2 deletions src/lib/features/Header.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

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

<!--Logo Link-->
<Story name="LogoLink">
<Header {menuItems} class="fixed left-0 top-0" innerClass="px-4" logoLink="/" />
<Header {menuItems} class="fixed left-0 top-0 w-full" innerClass="px-4" logoLink="/" />
</Story>
2 changes: 1 addition & 1 deletion src/lib/features/NavMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<div class="content-center">
<Button
size="auto"
class="text-navy"
class={item.isActive ? 'text-teal' : 'text-navy'}
active={item.isActive || false}
href={item.href}
target={item.isExternal ? '_blank' : '_self'}
Expand Down

0 comments on commit b6d97ba

Please sign in to comment.