docz icon indicating copy to clipboard operation
docz copied to clipboard

Children Prop doesn't render on Prop Table without explanation comment - Typescript

Open gmonte opened this issue 2 years ago • 0 comments

Question

Why the children prop only show in Props Table with description?

I am using typescript, so I created interfaces with my props. But the children prop only show in the <Prop /> table when I write a comment to explain it. How can I show this prop without the comment? I would like to be able to create the key children on my type or interface, and this prop show into the Prop table. It could be hide when I won't declare the children prop on my contract.

This doesn't show children prop:

interface Props {
  children: ReactNode | number;
}

This show children prop:

interface Props {
  /** something */
  children: ReactNode | number;
}

gmonte avatar Sep 06 '21 09:09 gmonte