You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{// Overrides the `PropTable` component that renders the table.// The props passed to this component are the props generated by react-docgenpropTableComponent: props=>{}}
This is the reason why I'd like to add this option:
Currently the two options for modifying the styles of the doc table are these:
{styles: {},// Overrides styles of addonmarksyConf: {},// Overrides components used to display markdown. Warning! This option's name will be likely deprecated in favor to "components" with the same API in 3.3 release. Follow this PR #1501 for details}
However, there are some things I'd like to do with my doc table that I don't think are currently possible.
I'm using Flow right now, and if I have a prop that is an enum. It will render the literal type annotation I wrote in flow (with the bars and everything) like this:
property
propType
required
default
description
fontWeight
'regular' | 'medium' | 'bold'
no
-
The font-weight of the text.
Instead I'd like to render the values as monospace and separated by commas
property
propType
required
default
description
fontWeight
'regular', 'medium', 'bold'
no
-
The font-weight of the text.
Also in order to give more room to the table, I'd like to remove the required column and instead render the prop name with an asterisk.
For example:
name
default
description
size*
'medium'
The size of the button
What do you think? I'd be more than happy to open a PR with a proof of concept!
The text was updated successfully, but these errors were encountered:
TLDR: I'd like to add an option like this:
This is the reason why I'd like to add this option:
Currently the two options for modifying the styles of the doc table are these:
However, there are some things I'd like to do with my doc table that I don't think are currently possible.
I'm using Flow right now, and if I have a prop that is an enum. It will render the literal type annotation I wrote in flow (with the bars and everything) like this:
Instead I'd like to render the values as monospace and separated by commas
'regular'
,'medium'
,'bold'
Also in order to give more room to the table, I'd like to remove the
required
column and instead render the prop name with an asterisk.For example:
'medium'
What do you think? I'd be more than happy to open a PR with a proof of concept!
The text was updated successfully, but these errors were encountered: