Remove primary and secondary props #736
Description
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:
- https://getbootstrap.com/docs/4.2/components/buttons/
- https://github.com/Semantic-Org/Semantic-UI/blob/master/src/definitions/elements/button.less
- http://react.carbondesignsystem.com/?selectedKind=Buttons&selectedStory=Sets%20of%20Buttons&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Fstories%2Fstories-panel
- https://developer.microsoft.com/en-us/fabric#/components/button
- https://blueprintjs.com/docs/#core/components/button
- https://evergreen.segment.com/components/button/
- https://vuetifyjs.com/ru/components/buttons
- https://reactstrap.github.io/components/buttons/
- https://material-ui.com/api/button/
- https://ant.design/components/button/
- https://atlaskit.atlassian.com/packages/core/button
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)