@@ -20,15 +20,15 @@ import { alertUser } from './alert/Alert';
2020import style from './password.module.css' ;
2121import { withTranslation } from 'react-i18next' ;
2222
23- export function PasswordInput ( props ) {
23+ export const PasswordInput = ( props ) => {
2424 const { seePlaintext, ...rest } = props ;
2525 return (
2626 < Input
2727 type = { seePlaintext ? 'text' : 'password' }
2828 { ...rest }
2929 />
3030 ) ;
31- }
31+ } ;
3232
3333class PasswordSingleInputClass extends Component {
3434 state = {
@@ -304,19 +304,19 @@ class PasswordRepeatInputClass extends Component {
304304
305305export const PasswordRepeatInput = withTranslation ( null , { withRef : true } ) ( PasswordRepeatInputClass ) ;
306306
307- function MatchesPattern ( { regex, value = '' , text } ) {
307+ const MatchesPattern = ( { regex, value = '' , text } ) => {
308308 if ( ! regex || ! value . length || regex . test ( value ) ) {
309309 return null ;
310310 }
311311
312312 return (
313313 < p style = { { color : 'var(--color-error)' } } > { text } </ p >
314314 ) ;
315- }
315+ } ;
316316
317317const excludeKeys = / ^ ( S h i f t | A l t | B a c k s p a c e | C a p s L o c k | T a b ) $ / i;
318318
319- function hasCaps ( { key } ) {
319+ const hasCaps = ( { key } ) => {
320320 // will return null, when we cannot clearly detect if capsLock is active or not
321321 if ( key . length > 1 || key . toUpperCase ( ) === key . toLowerCase ( ) || excludeKeys . test ( key ) ) {
322322 return null ;
@@ -325,4 +325,4 @@ function hasCaps({ key }) {
325325 // @ts -ignore (event can be undefined and shiftKey exists only on MouseEvent but not Event)
326326 // eslint-disable-next-line no-restricted-globals
327327 return key . toUpperCase ( ) === key && key . toLowerCase ( ) !== key && ! event . shiftKey ;
328- }
328+ } ;
0 commit comments