Skip to content

Commit 45fc594

Browse files
authored
Merge pull request #23 from jeffglaum/website-repairs
add external link nav button
2 parents fd82b66 + 56243ac commit 45fc594

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/components/header.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn Header() -> impl IntoView {
1919
<nav class="flex [column-gap:25px]">
2020
<NavButton href="/getting-started" label="Getting Started"/>
2121
<NavButton href="/projects" label="Projects"/>
22-
<NavButton href="https://opendevicepartnership.github.io/documentation/" label="Library"/>
22+
<ExternalNavButton href="https://opendevicepartnership.github.io/documentation/" label="Library"/>
2323
<NavButton href="/community" label="Community"/>
2424
<NavButton href="/home" label="Home"/>
2525
</nav>
@@ -44,3 +44,15 @@ fn NavButton(href: &'static str, label: &'static str) -> impl IntoView {
4444
</A>
4545
}
4646
}
47+
48+
#[component]
49+
fn ExternalNavButton(href: &'static str, label: &'static str) -> impl IntoView {
50+
view! {
51+
<a
52+
href=href
53+
class="odp-header-btn odp-header-btn-text"
54+
>
55+
{label}
56+
</a>
57+
}
58+
}

0 commit comments

Comments
 (0)