(react) add Input component

Finally the first form component of the design system. It wraps and enhance
the native input element.
This commit is contained in:
Nathan Vasse
2023-04-14 16:38:58 +02:00
committed by NathanVss
parent 4f1168463f
commit feea284ec8
18 changed files with 1121 additions and 32 deletions

View File

@@ -0,0 +1,15 @@
import { DefaultTokens } from "@openfun/cunningham-tokens";
export const tokens = (defaults: DefaultTokens) => ({
"font-weight": defaults.theme.font.weights.medium,
"font-size": defaults.theme.font.sizes.l,
"border-radius": "8px",
"border-radius--hover": "2px",
"border-radius--focus": "2px",
"border-width": "2px",
"border-color": defaults.theme.colors["greyscale-300"],
"border-color--hover": defaults.theme.colors["greyscale-500"],
"border-color--focus": defaults.theme.colors["primary-600"],
"border-style": "solid",
color: defaults.theme.colors["greyscale-800"],
});