This repository was archived by the owner on Mar 4, 2020. It is now read-only.
RFC: enhanceName
and replaceName
to customize styles
#1867
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR continues my idea about having
styleName
name.⭐️ Goal
variables
from themes as much as possible❓ How?
Naming is not final and is debatable, however:
enchanceName
to combine existing styles in a new component, allows to reuse existing variables and introduce new. Should contain the name of original componentreplaceName
to reset all component styles and style components from stratchThese props can't be combined.
🐺 Try it
I updated a
Button
example, so you can simply try it. UsePopup out
mode.🔨 Unresolved issues?
I don't have ideas about nested components like
Menu
,Dropdown
, etc. 🤔Pros
Button
component, no conflicts with factoriesButton:Danger
I reused existingButton
variables and usedcolorSchema
ButtonTertiary
I was able to follow existing Stardust patterns and used custom variables and custom styles. Accessibility and all other concerns are still there. And I didn't introduce a new component 🏆replaceName
I don't need to fight with existing stylesCons
Post yours!