Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .is-disabled state to Dropdown component #3686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iamtiagogalvao
Copy link

This is an improvement.

Proposed solution

Add a .is-disabled class to the .dropdown-item element

.dropdown-item
  color: $dropdown-item-color
  display: block
  font-size: 0.875rem
  line-height: 1.5
  padding: 0.375rem 1rem
  position: relative
  &.is-disabled
    color: $grey
    cursor: default
    pointer-events: none

Tradeoffs

None

Testing Done

Yes, I created a test environment where I used a Dropdown component and added a .is-disabled class to a .dropdown-item element. The results can be seen in the screenshot and GIF below:

A dropdown with a disabled item:
image

A GIF Showing the disabled behavior on :hover
gif

Changelog updated?

No.

- As stated in issue jgthms#3682 (Feature Request)
- Add a disabled state to the .dropdown-item of the dropdown component.
@@ -61,6 +62,10 @@ $dropdown-divider-background-color: $border-light !default
line-height: 1.5
padding: 0.375rem 1rem
position: relative
&.is-disabled
color: $grey
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use $text-disabled instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants