mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-23 13:07:57 +02:00
22 lines
463 B
Text
22 lines
463 B
Text
# Custom Props
|
|
|
|
```mdx-code-block
|
|
import {useCurrentSidebarCategory} from '@docusaurus/theme-common';
|
|
|
|
export const DocPropsList = ({items}) => (
|
|
<table>
|
|
<tr>
|
|
<th>Doc Page</th>
|
|
<th>Custom Props</th>
|
|
</tr>
|
|
{items.map((item, index) => (
|
|
<tr key={index}>
|
|
<td>{item.label}</td>
|
|
<td>{JSON.stringify(item.customProps)}</td>
|
|
</tr>
|
|
))}
|
|
</table>
|
|
);
|
|
|
|
<DocPropsList items={useCurrentSidebarCategory().items}/>
|
|
```
|