zeplin/cli-connect-react-plugin

Feature request: differentiate optional from mandatory props

rp-estebancalvi opened this issue · 1 comments

Hey, guys!
Me again. :-)

It would be nice of you to include diferentiation between mandatory and optional props.

Here's my props list for ButtonPrimary:

type Props = {
  color: string,
  content: string,
  children: any,
  disabled?: boolean,
  loading?: boolean,
  onPress?: Function,
  size?: string
};

And here's what connected components is showing:

<ButtonPrimary
  color={string}
  content={string}
  disabled={boolean}
  loading={boolean}
  onPress={Function}
  size={string}>
  {children}
</ButtonPrimary>

Aside from the kind of value, it's not telling which ones are mandatory and which ones aren't (indicated in this list by the use of ?).

It would be nice to have that ("required": (true | false)) and the option of adding a prop description ("description": "Description of prop \"foo\"."). As well as the deault value ("defaultValue": {...})

Cheers and thank you!

Hi Guys,

is there any progress on this? Let me know if I can help - this feature would be great!