feat(v2): add custom props for consumption by swizzled sidebar (#3888)

This commit is contained in:
Oliver Ullman 2020-12-10 11:49:21 -07:00 committed by GitHub
parent 0b05806593
commit b11c24b752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 11 deletions

View file

@ -21,13 +21,17 @@ declare module '@docusaurus/plugin-content-docs-types' {
permalinkToSidebar: PermalinkToSidebar;
};
export type PropSidebarItemLink = {
type PropsSidebarItemBase = {
customProps?: object;
};
export type PropSidebarItemLink = PropsSidebarItemBase & {
type: 'link';
href: string;
label: string;
};
export type PropSidebarItemCategory = {
export type PropSidebarItemCategory = PropsSidebarItemBase & {
type: 'category';
label: string;
items: PropSidebarItem[];