Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanjamal committed Jun 12, 2023
1 parent dcd6336 commit ae6daa4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions packages/header/src/docs/Description.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,18 @@ const nav = [
},
];

const MyLink = ({ children, ...props }) => (
const MyLink = ({ children, ...props }: HeaderLinkProps) => (
<a {...props} data-special-prop="special">
{children}
<>{children}</>
</a>
);

render(
<Header logoHref="https://heycar.com" CustomLink={MyLink} navigation={nav} />,
<Header
logoHref="https://heycar.com"
LinkComponent={MyLink}
navigation={nav}
/>,
);
```

Expand Down Expand Up @@ -433,6 +437,12 @@ render(
);
```

## Events

You can pass in a function via the `onToggleBurgerMenu` prop that will be called when the burger menu is opened or closed.

This was added so that the parent app can use the recommended pattern of disabled the page scroll while the burger menu is open

## Accessibility

The Header supports keyboard navigation and is compatible with screen readers.
Expand Down

0 comments on commit ae6daa4

Please sign in to comment.