Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: differentiate optional from mandatory props #11

Open
rp-estebancalvi opened this issue Jan 7, 2020 · 1 comment
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rp-estebancalvi
Copy link

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!

@yuqu yuqu transferred this issue from zeplin/connected-components-beta-issues Feb 26, 2020
@yuqu yuqu added enhancement New feature or request good first issue Good for newcomers labels Feb 26, 2020
@mtakac
Copy link

mtakac commented May 23, 2020

Hi Guys,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants