-
Notifications
You must be signed in to change notification settings - Fork 31
/
props.ts
40 lines (40 loc) · 1.12 KB
/
props.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import { Props as FocusTrapProps } from 'focus-trap-react';
export type NavHeaderProps = Readonly<{
/**
* A logo component to render in the header.
* @remarks should be wrapped in a link to the homepage or other relevant page.
* @example
* ```tsx
* export const Logo = ({ exampleLogo }: { exampleLogo: string }) => {
* // use the link and image component from your framework if applicable.
* return (
* <a href="/">
* <img src={exampleLogo} width="48" height="48" alt="Example Logo" />
* </a>
* );
* };
* ```
*
*/
Logo: React.ElementType;
/**
* Items to render for the main navigation. Should be <li></li> elements.
*/
mainNavItems?: React.ReactNode;
/**
* Secondary navigation menu. Should be <li></li> elements.
*/
secondaryNavItems?: React.ReactNode;
/**
* Styles to be applied to the mobile nav overlay.
*/
overlayStyles?: string;
/**
* Styles to be applied to the omnipresent navbar.
*/
navbarStyles?: string;
/**
* Options to pass to the FocusTrap component used to trap focus within the mobile nav overlay.
*/
focusTrapOptions?: FocusTrapProps['focusTrapOptions'];
}>;