Skip to content

Commit

Permalink
docs: add missing key prop, add aria for current page + adjust layo…
Browse files Browse the repository at this point in the history
…ut a tiny bit (#3239)
  • Loading branch information
sebald authored Aug 1, 2023
1 parent dd65ac9 commit 9861b88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion docs/app/_components/NavLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,9 @@ export const NavLink = ({
className,
...props
}: NavLinkProps) => (
<Link {...props} className={cn(styles({ variant, current, className }))} />
<Link
{...props}
className={cn(styles({ variant, current, className }))}
aria-current={current ? 'page' : undefined}
/>
);
8 changes: 4 additions & 4 deletions docs/app/_components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export const Navigation = ({ onClick }: NavigationProps) => {
const navigation = useNavigation();

return (
<nav className="flex flex-col gap-8 pl-4 pr-11 pt-8">
<nav className="mb-12 flex flex-col gap-10 pl-4 pr-11 pt-8">
{navigation.map(section => (
<div className="flex flex-col gap-4">
<div key={section.name} className="flex flex-col gap-2">
<div className="font-semibold">{section.name}</div>
<div className="border-secondary-300 ml-0.5 flex flex-col gap-2 border-l">
{section.links.map(({ name, href }) => (
Expand All @@ -88,8 +88,8 @@ export const Navigation = ({ onClick }: NavigationProps) => {
</div>
{section.subsections &&
section.subsections.map(({ name, links }) => (
<div key={name} className="flex flex-col gap-2 pb-4">
<div className="text-secondary-700 text-sm font-semibold">
<div key={name} className="flex flex-col gap-2.5 pb-4">
<div className="text-secondary-600 text-sm font-semibold">
{name}
</div>
<div className="border-secondary-300 ml-0.5 flex flex-col gap-2 border-l">
Expand Down

2 comments on commit 9861b88

@vercel
Copy link

@vercel vercel bot commented on 9861b88 Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

marigold-docs – ./

marigold-docs.vercel.app
marigold-docs-git-main-marigold.vercel.app
marigold-docs-marigold.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 9861b88 Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

marigold-storybook – ./

marigold-storybook-marigold.vercel.app
marigold-latest.vercel.app
marigold-storybook-git-main-marigold.vercel.app

Please sign in to comment.