Skip to content

Commit d1016b6

Browse files
authored
Set alignment for Dropdown and update nav margin-left (#172)
- Define `align='center'` on `DropdownMenuContent` in `DropdownMenu.tsx` - Update navbar `margin-left` to improve spacing between logo and buttons in `ReactHeader.astro`
1 parent 9f5cd34 commit d1016b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/DropdownMenu.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export const Dropdown: React.FC<DropdownProps> = ({ children, items }) => {
2323
<DropdownMenuTrigger asChild>
2424
<Button
2525
variant="ghost"
26-
className="data-[state='open']:bg-accent group hidden h-9 px-2 text-muted-foreground hover:text-foreground/80 hover:no-underline data-[state='open']:text-foreground/80 sm:flex">
26+
className="group hidden h-9 px-2 text-muted-foreground hover:text-foreground/80 hover:no-underline data-[state='open']:bg-accent data-[state='open']:text-foreground/80 sm:flex">
2727
{children}
2828
</Button>
2929
</DropdownMenuTrigger>
30-
<DropdownMenuContent className="w-24 min-w-fit">
30+
<DropdownMenuContent className="w-24 min-w-fit" align="center">
3131
{items.map((item) => (
3232
<DropdownMenuItem
3333
key={item.name}
@@ -39,4 +39,4 @@ export const Dropdown: React.FC<DropdownProps> = ({ children, items }) => {
3939
</DropdownMenuContent>
4040
</DropdownMenu>
4141
);
42-
}
42+
};

src/components/ReactHeader.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const allPosts = await Astro.glob('@pages/posts/*.md');
2020
bassim
2121
</h1>
2222
</a>
23-
<nav class="button-container flex w-full items-center justify-between pl-3">
23+
<nav class="button-container flex w-full items-center justify-between ml-2">
2424
<span class="flex gap-2 px-4">
2525
{
2626
mainLinks.map((link, index) => (

0 commit comments

Comments
 (0)