Skip to content

Commit

Permalink
code review: moving extra props at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini committed Dec 2, 2023
1 parent 7964220 commit f216550
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/ui-components/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(

return (
<button
{...otherProps}
ref={ref}
className={buttonClass}
onClick={onClick}
disabled={disabled}
type={type}
aria-label={ariaLabel}
{...otherProps}
>
{children}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ export const ButtonIcon = React.forwardRef<HTMLButtonElement, ButtonIconProps>(
return (
<>
<button
{...otherProps}
ref={ref}
className={buttonClass}
onClick={onClick}
disabled={disabled}
type={type}
aria-label={ariaLabel || label}
{...otherProps}
>
{children}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
{label}
</label>
<input
{...extraProps}
ref={ref}
id={inputId}
name={name}
Expand All @@ -78,6 +77,7 @@ export const TextInput = React.forwardRef<HTMLInputElement, TextInputProps>(
{...(error && { "aria-invalid": "true" })}
{...(rightElement &&
!raw && { style: { paddingRight: inputPaddingRight } })}
{...extraProps}
/>
{!raw && (
<label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ export const TextInputMask = React.forwardRef<
return (
<>
<TextInput
{...otherProps}
ref={mergedInputRef}
name={name}
label={label}
Expand All @@ -154,6 +153,7 @@ export const TextInputMask = React.forwardRef<
{masked ? <IconShow /> : <IconHide />}
</ButtonIcon>
}
{...otherProps}
/>

<LiveRegion
Expand Down

0 comments on commit f216550

Please sign in to comment.