(react) add a design token for checkbox hover background

This was based on recent feedbacks to provide more granularity for
customization.

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

View File

@@ -95,6 +95,7 @@ Here are available custom design tokens.
| Token | Description |
|--------------- |----------------------------- |
| background-color--hover | Background color of the component on mouse hover or focus |
| font-size | Label font size ( shared with radio ) |
| font-weight | Label font weight ( shared with radio ) |
| color | Label color ( shared with radio ) |

View File

@@ -24,7 +24,7 @@
cursor: pointer;
&:hover, &:focus-within {
background-color: var(--c--theme--colors--greyscale-200);
background-color: var(--c--components--forms-checkbox--background-color--hover);
}
&:focus-within {

View File

@@ -1,6 +1,7 @@
import { DefaultTokens } from "@openfun/cunningham-tokens";
export const tokens = (defaults: DefaultTokens) => ({
"background-color--hover": defaults.theme.colors["greyscale-200"],
"font-size": defaults.theme.font.sizes.m,
"font-weight": defaults.theme.font.weights.medium,
color: defaults.theme.colors["greyscale-900"],