Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

importing props from another component #230

Open
jnhooper opened this issue Apr 10, 2020 · 0 comments
Open

importing props from another component #230

jnhooper opened this issue Apr 10, 2020 · 0 comments

Comments

@jnhooper
Copy link

馃憢 First off, I love this project, thanks for all the work you do on it!
The problem i'm trying to solve is I have a base component with some props like so

export const baseComponentProps = {
  color: PropTypes.string,
  title: PropTypes.string,
}

Then i want to compose this component elsewhere and pass through some of these props

import {baseComponentProps} from '../BaseComponent';

const newComponentProps = {
  ...baseComponentProps,
  accentColor: PropTypes.string,
}

For some reason only accentColor will show up in the generated prop table. is there a setting i'm missing, or is this a bug/feature request? Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant