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-onboarding",
"@storybook/addon-links", "@storybook/addon-links",
"@storybook/addon-essentials", "@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions", "@storybook/addon-interactions",
], ],
framework: { framework: {

2658
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

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

View File

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