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

Mouse cursor won't change when moving over a component that is disabled #228

Closed
ketsappi opened this issue Oct 29, 2019 · 1 comment
Closed
Assignees
Labels
Accessibility bug Something isn't working enhancement New feature or request

Comments

@ketsappi
Copy link
Contributor

The Problem

Mouse cursor won't change when moving over a component that is disabled.

Proposed Solution

The components that have disabled-attribute should have the cursor: not-allowed; in the disabled-style.

Of the existing components, the following should have this

  • Button
  • SearchInput
  • TextInput
  • Toggle

These components currently haven't the disabled-attribute, but if it is added; then these should also have the change

  • Dropdown
  • Menu

Additional Info

cursor - CSS: Cascading Style Sheets | MDN - Mozilla

@ketsappi ketsappi added the enhancement New feature or request label Oct 29, 2019
@J-Kallunki J-Kallunki added Accessibility bug Something isn't working labels Oct 29, 2019
@J-Kallunki
Copy link
Contributor

J-Kallunki commented Oct 29, 2019

Create src/components/utils/css.ts-file
and disabledCursor -util/mixin there with css (from styled components).

Use that mixin to src/components where disabled is used with:

styled((props: ...) => (
  .....
))`
  &.componentfoobar--disabled {
    ${disabledCursor}
  }
  `;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants