Skip to content

Copy defaultProps when composing a styled component #8

@frenic

Description

@frenic
const Button = styled.button({});
Button.defaultProps = { type: 'button' };

const AnotherButton = styled(Button, {}); // <- Should also have `{ type: 'button' }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions