Skip to content

Commit

Permalink
[@mantine/core] Input: Fix size not being applied when set from error…
Browse files Browse the repository at this point in the history
… props and descriptionProps (#2603)
  • Loading branch information
rtivital committed Oct 3, 2022
1 parent a85b20f commit ec1edd0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mantine-core/src/ActionIcon/ActionIcon.tsx
Expand Up @@ -82,7 +82,7 @@ export const _ActionIcon = forwardRef<HTMLButtonElement, ActionIconProps>((props
<UnstyledButton
className={cx(classes.root, className)}
ref={ref}
disabled={disabled || loading}
disabled={disabled}
data-disabled={disabled || undefined}
data-loading={loading || undefined}
unstyled={unstyled}
Expand Down
14 changes: 12 additions & 2 deletions src/mantine-core/src/Input/InputWrapper/InputWrapper.tsx
Expand Up @@ -132,15 +132,25 @@ export const InputWrapper = forwardRef<HTMLDivElement, InputWrapperProps>((props
);

const _description = description && (
<InputDescription key="description" {...sharedProps} {...descriptionProps}>
<InputDescription
key="description"
{...descriptionProps}
{...sharedProps}
size={descriptionProps.size || sharedProps.size}
>
{description}
</InputDescription>
);

const _input = <Fragment key="input">{inputContainer(children)}</Fragment>;

const _error = typeof error !== 'boolean' && error && (
<InputError {...errorProps} key="error" {...sharedProps}>
<InputError
{...errorProps}
{...sharedProps}
size={errorProps.size || sharedProps.size}
key="error"
>
{error}
</InputError>
);
Expand Down

0 comments on commit ec1edd0

Please sign in to comment.