@@ -30,22 +30,22 @@ import {
3030import { css } from '@emotion/css' ;
3131import DOMPurify from 'dompurify' ;
3232import { cloneElement , CSSProperties , ReactElement } from 'react' ;
33- import flowIconRegistry from '../../primitives/Icons/flowIconRegistry' ;
3433import { UseTranslation } from '../../../hooks/useTranslation' ;
3534import FacebookButton from '../../adapters/FacebookButton' ;
3635import GitHubButton from '../../adapters/GitHubButton' ;
3736import GoogleButton from '../../adapters/GoogleButton' ;
37+ import ImageComponent from '../../adapters/ImageComponent' ;
3838import LinkedInButton from '../../adapters/LinkedInButton' ;
3939import MicrosoftButton from '../../adapters/MicrosoftButton' ;
4040import SignInWithEthereumButton from '../../adapters/SignInWithEthereumButton' ;
4141import SmsOtpButton from '../../adapters/SmsOtpButton' ;
4242import { createField } from '../../factories/FieldFactory' ;
4343import Button from '../../primitives/Button/Button' ;
4444import Divider from '../../primitives/Divider/Divider' ;
45+ import flowIconRegistry from '../../primitives/Icons/flowIconRegistry' ;
4546import Select from '../../primitives/Select/Select' ;
4647import Typography from '../../primitives/Typography/Typography' ;
4748import { TypographyVariant } from '../../primitives/Typography/Typography.styles' ;
48- import ImageComponent from '../../adapters/ImageComponent' ;
4949
5050const logger : ReturnType < typeof createPackageComponentLogger > = createPackageComponentLogger (
5151 '@asgardeo/react' ,
@@ -161,7 +161,7 @@ const createAuthComponentFromFlow = (
161161 if ( ! text || ( ! options . t && ! options . meta ) ) {
162162 return text || '' ;
163163 }
164- return resolveVars ( text , { meta : options . meta , t : options . t || ( ( k : string ) => k ) } ) ;
164+ return resolveVars ( text , { meta : options . meta , t : options . t || ( ( k : string ) : string => k ) } ) ;
165165 } ;
166166
167167 switch ( component . type ) {
@@ -348,7 +348,7 @@ const createAuthComponentFromFlow = (
348348 key = { key }
349349 className = { richTextClass }
350350 // Manually sanitizes with `DOMPurify`.
351- // eslint-disable-next-line react/no-danger
351+ // IMPORTANT: DO NOT REMOVE OR MODIFY THIS SANITIZATION STEP.
352352 dangerouslySetInnerHTML = { { __html : DOMPurify . sanitize ( resolve ( component . label ) ) } }
353353 />
354354 ) ;
@@ -361,18 +361,18 @@ const createAuthComponentFromFlow = (
361361 component = {
362362 {
363363 config : {
364- src : resolve ( component . src ) ,
365364 alt : resolve ( component . alt ) || resolve ( component . label ) || 'Image' ,
366- width : resolve ( component . width . toString ( ) ) || '100%' ,
367365 height : resolve ( component . height . toString ( ) ) || 'auto' ,
366+ src : resolve ( component . src ) ,
367+ width : resolve ( component . width . toString ( ) ) || '100%' ,
368368 } ,
369369 } as any
370370 }
371371 formErrors = { undefined }
372372 formValues = { undefined }
373373 isFormValid = { false }
374374 isLoading = { false }
375- onInputChange = { function ( name : string , value : string ) : void {
375+ onInputChange = { ( ) : void => {
376376 throw new Error ( 'Function not implemented.' ) ;
377377 } }
378378 touchedFields = { undefined }
0 commit comments