Skip to content

Feature request: differentiate optional from mandatory props #11

@rigilk-code

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!

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