docz
docz copied to clipboard
Props of TypeScript Shape?
Can I output the props of a TypeScript shape (type or interface)?
Let's say I've got this component:
interface IItem {
key: string;
value: string;
}
type MyComponentProps = {
items: IItem[];
}
function MyComponent({ items }): MyComponentProps {
render <div></div?
}
If I use the docz Props component in my mdx file, I get this output:
<Props of={MyComponent} />
items IItem[]
Is there a way to automatically render the IITem interface so that readers can understand how this array should look?