-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nav): Stop using config for primary navigation #83666
Conversation
<Fragment> | ||
<SidebarBody> | ||
<SidebarItem | ||
item={{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in this file was taken from sidebar.tsx
except for the below items which used to be defined in a config file
if (!to) { | ||
throw new Error( | ||
`Nav item "${item.label}" must have either a \`dropdown\` or \`to\` value!` | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this not be done via typescript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was existing code. I'm getting rid of the item
prop anyway, once I'm fully off the config you'll just render a link or dropdown depending on what you want
The plan is to stop using the config and just render items as JSX. This moves all the primary items in the config over to JSX. No behavior changes.