mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-06 12:52:31 +02:00
feat(v2): add custom props for consumption by swizzled sidebar (#3888)
This commit is contained in:
parent
0b05806593
commit
b11c24b752
6 changed files with 41 additions and 11 deletions
|
@ -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[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue