Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Remove primary and secondary props #736

Closed
@bmdalex

Description

@bmdalex

Feature Request

Problem description

We're using these properties for Button and Menu components in order to offer the theme developers the ability to customize components in terms of behavior and emphasis.

We are introducing the color prop for all the components where it makes sense (see #426). One of the colors we're introducing is called primary
e.g. usage:

<Menu `color='primary' items={[1, 2, 3]} .../>`)

We found out that this is enough for covering the scenarios for primary prop.

Proposed solution

It become very complex and dangerous to support this API because of the complexity involved with evaluating both boolean props primary and color for changing colors in Menu and Button.

Since we don't have default flavors and the primary & secondary props do not seem to change other styles, primary & secondary become redundant.

@layershifter did a great job and helped me identify what others libraries are doing; here's a list:

TODO (update on libraries)

What's more, this change would be better from a technical POV since we'd have only one prop manipulate colors, making code simpler, more robust and easier to maintain.

TODO (proposal)

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCvstsPaired with ticket in vsts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions