-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '3553e5ebc9f853d944e378bc24e8d91275163e37' into HEAD
- Loading branch information
Showing
567 changed files
with
30,361 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule web-ui
updated
6 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Fragment } from 'react'; | ||
import DocCardList, { type Props as DocCardListProps } from '@theme/DocCardList'; | ||
import { useCurrentSidebarCategory } from '@docusaurus/theme-common'; | ||
import { PropSidebarItem, PropSidebarItemCategory } from '@docusaurus/plugin-content-docs'; | ||
import Heading, { type HeadingType } from '@theme/Heading'; | ||
|
||
export interface Props extends Omit<DocCardListProps, 'items'> { | ||
headingLevel?: HeadingType; | ||
} | ||
|
||
function isCategory(item: PropSidebarItem): item is PropSidebarItemCategory { | ||
return item.type === 'category'; | ||
} | ||
|
||
export default function SubcategoryDocCardList({ headingLevel, ...props }: Props) { | ||
const category = useCurrentSidebarCategory(); | ||
const subcategories = category.items.filter(isCategory); | ||
return subcategories.map((subcategory) => ( | ||
<Fragment key={subcategory.label}> | ||
<Heading as={headingLevel ?? 'h2'}>{subcategory.label}</Heading> | ||
<DocCardList items={subcategory.items} {...props} /> | ||
</Fragment> | ||
)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.