Skip to content

Commit

Permalink
chore: small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquemod committed May 9, 2022
1 parent 859f139 commit 6dcdc6b
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/core/PinInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,10 @@ const PinInput: React.FC<PinInputGridProps> = ({
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
}

Expand All @@ -132,13 +129,10 @@ const PinInput: React.FC<PinInputGridProps> = ({
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
}

Expand All @@ -148,7 +142,7 @@ const PinInput: React.FC<PinInputGridProps> = ({
{ Array.from({ length: pinLength }, (_, index) => (
<TextField
disabled={ isValidating }
variant={ variant ? variant : 'outlined' }
variant={ variant || 'outlined' }
onKeyDown={ event => onKeyDown(event, index) }
onPaste={ onPaste }
color='primary'
Expand Down

0 comments on commit 6dcdc6b

Please sign in to comment.