Skip to content

Commit 352434a

Browse files
committed
Update nav sizes
1 parent 2b3ac0b commit 352434a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

website/src/components/Nav.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
---
22
export type Props = {
3+
small?: boolean;
34
items: {
45
href: string;
56
label: string;
67
}[];
78
};
89
9-
const { items } = Astro.props;
10+
const { items, small = false } = Astro.props;
1011
const { pathname: currentPath } = Astro.url;
1112
---
1213

@@ -23,7 +24,9 @@ const { pathname: currentPath } = Astro.url;
2324
href={href}
2425
aria-current={isCurrent ? "page" : undefined}
2526
class={[
26-
"px-4 py-2 text-sm font-medium border border-gray-300 -me-[1px]",
27+
"font-medium border border-gray-300 -me-[1px]",
28+
!small && "text-sm px-4.5 py-2",
29+
small && "text-xs px-2.5 py-1.5",
2730
"hover:bg-gray-100 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500",
2831
index === 0 ? "rounded-l-lg" : "",
2932
index === items.length - 1 ? "rounded-r-lg" : "",

website/src/pages/spa-1.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ new Swup({
4141

4242
<div data-swup-morph="spa-nav">
4343
<Nav
44+
small
4445
items={[
4546
{
4647
href: "/spa-1/",

website/src/pages/spa-2.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ new Swup({
4040

4141
<div data-swup-morph="spa-nav">
4242
<Nav
43+
small
4344
items={[
4445
{
4546
href: "/spa-1/",

0 commit comments

Comments
 (0)