Add color prop to VaDivider component and bind it to CSS border color#3154
Merged
rustem-nasyrov merged 5 commits intoepicmaxco:developfrom Mar 24, 2023
Yasir761:change-color-prop
Merged
Add color prop to VaDivider component and bind it to CSS border color#3154rustem-nasyrov merged 5 commits intoepicmaxco:developfrom Yasir761:change-color-prop
rustem-nasyrov merged 5 commits intoepicmaxco:developfrom
Yasir761:change-color-prop
Conversation
…ers to specify the color of the divider. The color prop is then bound to the CSS border-color property using Vue's v-bind in CSS feature. This enables users to dynamically change the divider color using the color prop.
Contributor
Author
|
Please let me know, if there is chance to make a change. |
rustem-nasyrov
suggested changes
Mar 13, 2023
Contributor
There was a problem hiding this comment.
Hello, @Yasir761! Thank you for your pull request. Here is a few suggestions.
- Redundant
colorprop. - Let's create a common CSS variable for the border color and use it for horizontal and vertical views. Tip: you can create CSS variable in the
_variables.scssfile at the va-divider directory.
…g the border color in the va-divider component. This commit refactors the code to use a common CSS variable --va-divider-color for defining the border color, which can be used for both horizontal and vertical views. The CSS variable has been added to the :root and :host selectors in the _variables.scss file in the va-divider directory. This results in cleaner and more maintainable code
Member
@rustem-nasyrov, I would prefer to have Compare this: <va-divier :color="isDark ? 'text-light' : 'text-dark'" />
<va-divider :style="`--va-divider-color: ${getColor(isDark ? 'text-light' : 'text-dark')}`" /> |
…pecifying the border color in the va-divider component. This commit refactors the code to use a common CSS variable --va-divider-color for defining the border color, which can be used for both horizontal and vertical views. The CSS variable has been added to the :root and :host selectors in the _variables.scss file in the va-divider directory. This results in cleaner and more maintainable code" This reverts commit b4cd213.
rustem-nasyrov
suggested changes
Mar 20, 2023
Contributor
rustem-nasyrov
left a comment
There was a problem hiding this comment.
Keep it up! Just need to do a little fix and issue will be solved! :)
rustem-nasyrov
approved these changes
Mar 24, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Close #3153
…ers to specify the color of the divider. The color prop is then bound to the CSS border-color property using Vue's v-bind in CSS feature. This enables users to dynamically change the divider color using the color prop.
Description
Markup:
Details
Types of changes