Skip to content

Feature request: differentiate optional from mandatory props #11

Description

@rigilk-code

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions