Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Composite proptypes do know work with smart knobs #26

Open

Description

@lopis

Let's say I have an Input component with these prop types:

Input.propTypes = {
  value: PropTypes.string,
  error: PropTypes.bool,
  valid: PropTypes.bool,
  onChange: PropTypes.func,
  multiline: PropTypes.bool
}

Then I have a TextArea component with these prop types:

import { Input } from './Input'

TextArea.propTypes = {
  ...Input.propTypes,
  rows: PropTypes.number
}

Smart knobs correctly pick the rows prop up, but fail to show the knobs for the Input. This should work as it works with React. Why is it different in smart knobs?

Activity

  1. lucasconstantino commented on Apr 23, 2018

    @lucasconstantino
    Contributor

    This is probably an issue with babel-plugin-react-docgen. Could you have a look at that package and try and reproduce your issue? If it does reproduce, please open an issue there and mention it here ;)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions