diff --git a/src/core/PinInput.tsx b/src/core/PinInput.tsx index a4967918..276bcb0a 100644 --- a/src/core/PinInput.tsx +++ b/src/core/PinInput.tsx @@ -116,13 +116,10 @@ const PinInput: React.FC = ({ const style = { width: size === 'small' ? '40px' : '40px', height: size === 'small' ? '30px' : '40px', - marginInline: size === 'small' ? '5px' : '10px' + marginInline: size === 'small' ? '5px' : '10px', + ...styleProps } as React.CSSProperties - if (styleProps) { - Object.assign(style, styleProps) - } - return style } @@ -132,13 +129,10 @@ const PinInput: React.FC = ({ textAlign: 'center', fontWeight: 'bold', fontSize: size === 'small' ? '16px' : '20px', - padding: 'auto' + padding: 'auto', + ...inputProps } as React.CSSProperties - if (inputProps) { - Object.assign(style, inputProps) - } - return style } @@ -148,7 +142,7 @@ const PinInput: React.FC = ({ { Array.from({ length: pinLength }, (_, index) => ( onKeyDown(event, index) } onPaste={ onPaste } color='primary'