Change the input size attribute to variant

This commit is contained in:
Arnaud 2024-11-20 12:54:48 +01:00
parent 951365bac3
commit 6323baf381
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
4 changed files with 630 additions and 2038 deletions

View File

@ -9,7 +9,6 @@ const config: StorybookConfig = {
"@storybook/addon-onboarding",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
],
framework: {

2656
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
"type": "git",
"url": "https://github.com/codex-storage/codex-marketplace-ui-components"
},
"version": "0.0.44",
"version": "0.0.45",
"type": "module",
"scripts": {
"prepack": "npm run build",
@ -44,7 +44,6 @@
"vite-plugin-svgr": "^4.3.0",
"@svgr/plugin-svgo": "^8.1.0",
"@codex-storage/sdk-js": "^0.0.15",
"@chromatic-com/storybook": "^2.0.2",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",

View File

@ -39,7 +39,7 @@ type Props = {
inputContainerClassName?: string;
size?: "big" | "medium";
variant?: "big" | "medium";
} & InputHTMLAttributes<HTMLInputElement>;
export const Input = forwardRef<HTMLInputElement, Props>(
@ -51,7 +51,7 @@ export const Input = forwardRef<HTMLInputElement, Props>(
style,
Icon,
inputClassName,
size = "big",
variant = "big",
inputContainerClassName = "",
disabled = false,
onChange,
@ -78,7 +78,7 @@ export const Input = forwardRef<HTMLInputElement, Props>(
["input"],
["input--invalid", invalid || isInvalid],
["input--icon", !!Icon],
["input--" + size],
["input--" + variant],
[inputClassName || ""]
)}
>