Skip to content

Make transferred props more DRY #88

@adamkudrna

Description

@adamkudrna

Related to #86.

It would be handy to combine the definition of props to transfer with propTypes. Currently it's white-listed aside like here in Button:

  const propsToTransfer = transferProps(
    props,
    ['afterLabel', 'beforeLabel', 'block', 'clickHandler', 'disabled', 'endCorner', 'grouped', 'id',
      'label', 'labelVisibility', 'loadingIcon', 'priority', 'size', 'startCorner', 'type', 'variant'],
  );

Code could be also more DRY and easier to write and maintain then.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions