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

Composite proptypes do know work with smart knobs #26

Open
lopis opened this issue Apr 23, 2018 · 1 comment
Open

Composite proptypes do know work with smart knobs #26

lopis opened this issue Apr 23, 2018 · 1 comment

Comments

@lopis
Copy link

lopis commented Apr 23, 2018

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?

@lucasconstantino
Copy link
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants