File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11---
22export 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 ;
1011const { 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" : " " ,
Original file line number Diff line number Diff 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/" ,
Original file line number Diff line number Diff 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/" ,
You can’t perform that action at this time.
0 commit comments