fix(component): input style (#2285)

This commit is contained in:
Himself65 2023-05-10 04:01:29 +08:00 committed by GitHub
parent b978bb171a
commit a84ca43ce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,7 @@ export const Input = forwardRef<HTMLInputElement, inputProps>(function Input(
width,
onChange,
noBorder = false,
className,
...otherProps
}: inputProps,
ref: ForwardedRef<HTMLInputElement>
@ -51,7 +52,7 @@ export const Input = forwardRef<HTMLInputElement, inputProps>(function Input(
return (
<input
className={clsx(inputStyle, otherProps.className)}
className={clsx(inputStyle, className)}
style={assignInlineVars({
[widthVar]: width ? `${width}px` : '100%',
[heightVar]: height ? `${height}px` : 'unset',