importing props from another component
jnhooper opened this issue Β· comments
John Nissen-Hooper commented
π 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!