diff --git a/packages/react/src/components/password-creation-input/password-creation-input.tsx b/packages/react/src/components/password-creation-input/password-creation-input.tsx index 1fe62deadd..6f0219ddc3 100644 --- a/packages/react/src/components/password-creation-input/password-creation-input.tsx +++ b/packages/react/src/components/password-creation-input/password-creation-input.tsx @@ -20,14 +20,19 @@ const StyledUl = styled.ul` `; const PasswordInputContainer = styled.div` + align-items: center; display: flex; margin-bottom: var(--spacing-1x); position: relative; `; +const StyledInput = styled(Input)` + padding-right: var(--size-2x); +`; + const ShowPasswordButton = styled.div` position: absolute; - right: 0; + right: 0.25rem; `; interface PasswordCreationInputProps { @@ -93,7 +98,7 @@ export const PasswordCreationInput: VoidFunctionComponent - diff --git a/packages/react/src/components/password-input/password-input.test.tsx.snap b/packages/react/src/components/password-input/password-input.test.tsx.snap index 2333de853c..1076144eff 100644 --- a/packages/react/src/components/password-input/password-input.test.tsx.snap +++ b/packages/react/src/components/password-input/password-input.test.tsx.snap @@ -30,10 +30,10 @@ exports[`PasswordInput matches the snapshot (Disabled) 1`] = ` -ms-letter-spacing: 0.025rem; letter-spacing: 0.025rem; line-height: 1rem; - min-height: var(--size-2x); + min-height: var(--size-1halfx); min-width: 2rem; outline: none; - padding: 0 var(--spacing-2x); + padding: 0 var(--spacing-1halfx); text-transform: uppercase; -webkit-user-select: none; -moz-user-select: none; @@ -62,8 +62,9 @@ exports[`PasswordInput matches the snapshot (Disabled) 1`] = ` background-color: transparent; border-color: transparent; color: #60666E; + min-width: var(--size-1halfx); padding: 0; - width: var(--size-2x); + width: var(--size-1halfx); } .c7 { @@ -349,6 +350,10 @@ exports[`PasswordInput matches the snapshot (Disabled) 1`] = ` } .c1 { + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -362,7 +367,7 @@ exports[`PasswordInput matches the snapshot (Disabled) 1`] = ` .c4 { position: absolute; - right: 0; + right: 0.25rem; }
= ({ @@ -116,6 +117,7 @@ export const PasswordInput: VoidFunctionComponent = ({ data-testid="show-password-button" type="button" onClick={handleShowPassword} + size="small" />