(react) set specific cursor on checkbox related components

Even if this is not the default behavior of the native checkbox, based on
recent feedbacks and by comparing what other components libraries do, it
appears that setting a custom cursor on checkbox hover is the most
intuitive thing to do.

Resolve #59
This commit is contained in:
Nathan Vasse
2023-05-22 15:24:11 +02:00
committed by NathanVss
parent 6f77131839
commit 527c3fc0c9
3 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@openfun/cunningham-react": minor
---
set specific cursor on checkbox related components

View File

@@ -21,6 +21,7 @@
border-color: transparent; border-color: transparent;
// To automatically align the checkbox to the left side. // To automatically align the checkbox to the left side.
margin-left: -1 * $padding; margin-left: -1 * $padding;
cursor: pointer;
&:hover, &:focus-within { &:hover, &:focus-within {
background-color: var(--c--theme--colors--greyscale-200); background-color: var(--c--theme--colors--greyscale-200);
@@ -57,6 +58,7 @@
border: 1.5px solid var(--c--components--forms-checkbox--border-color); border: 1.5px solid var(--c--components--forms-checkbox--border-color);
border-radius: var(--c--components--forms-checkbox--border-radius); border-radius: var(--c--components--forms-checkbox--border-radius);
display: block; display: block;
cursor: pointer;
&:focus { &:focus {
outline: none; outline: none;
@@ -108,6 +110,7 @@
&--disabled { &--disabled {
border-color: transparent; border-color: transparent;
color: var(--c--theme--colors--greyscale-600); color: var(--c--theme--colors--greyscale-600);
cursor: not-allowed;
svg { svg {
color: var(--c--theme--colors--greyscale-400); color: var(--c--theme--colors--greyscale-400);

View File

@@ -9,6 +9,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
cursor: pointer;
&:focus { &:focus {
outline: none; outline: none;