Skip to content

importing props from another componentΒ #230

@jnhooper

Description

@jnhooper

πŸ‘‹ 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions