✨(react) add Switch component
Implement a shiny new component that can be used as an alternative to the regular checkbox.
This commit is contained in:
11
packages/react/src/components/Forms/Switch/tokens.ts
Normal file
11
packages/react/src/components/Forms/Switch/tokens.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { DefaultTokens } from "@openfun/cunningham-tokens";
|
||||
|
||||
export const tokens = (defaults: DefaultTokens) => ({
|
||||
"accent-color": defaults.theme.colors["success-700"],
|
||||
"rail-background-color": defaults.theme.colors["greyscale-500"],
|
||||
"rail-background-color--disabled": defaults.theme.colors["greyscale-400"],
|
||||
"rail-border-radius": "50vw",
|
||||
"handle-background-color": "white",
|
||||
"handle-background-color--disabled": defaults.theme.colors["greyscale-200"],
|
||||
"handle-border-radius": "50%",
|
||||
});
|
||||
Reference in New Issue
Block a user