Skip to content

Commit

Permalink
Merge branch 'main' into patch-basic-dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchthorson authored Apr 23, 2024
2 parents 5aeeaff + 113b4f3 commit 9a4a576
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fixes Intro code chunk to be up to date
- Changes snake_case variables to camelCase
- Change BasicDropdown's value prop to accept null
- Add Navbar case for no projectUrl with story documentation

## v0.7.1

Expand Down
11 changes: 9 additions & 2 deletions src/lib/Navbar/Navbar.stories.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@
<Story name="Default" />

<Story
name="With title"
name="With title, no project link"
args={{
title: "Project title"
}}
/>

<Story
name="With title and project link"
args={{
title: "Project title",
projectUrl: "https://urban.org"
Expand All @@ -55,7 +62,7 @@
name="TPC"
args={{
title: "Project title",
projectUrl: "https://urban.org",
projectUrl: "https://taxpolicycenter.org",
brand: "tpc"
}}
/>
6 changes: 5 additions & 1 deletion src/lib/Navbar/Navbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* URL to link to from the title
* @type {string}
*/
export let projectUrl;
export let projectUrl = "";
/**
* Brand to use for the logo
Expand Down Expand Up @@ -40,9 +40,13 @@
</a>
</div>
{#if title}
{#if projectUrl}
<a href="{projectUrl}/">
<p class="nav--page-title">{title}</p>
</a>
{:else}
<p class="nav--page-title">{title}</p>
{/if}
{/if}
</nav>

Expand Down

0 comments on commit 9a4a576

Please sign in to comment.