Options
All
  • Public
  • Public/Protected
  • All
Menu

Properties for the CognitoLogin component.

Has callback events for onLoggedIn and onRegisteredUser.

Customize using style, scrolViewStyle, buttonProps, loginButtonProps etc.

Children can be supplied to the forms: registerChildren, confirmChildren, forgotChildren, loginChildren

Hierarchy

  • object
    • ICognitoLoginProps

Index

Properties

Optional activeForm

activeForm: LoginCurrentForm | undefined

Sets the active form. Read more: {@link AuthFormState}

Optional buttonProps

buttonProps: ICrossButtonProps | undefined

Optional props to customize all buttons. Typically used to change the mode prop.

Read more: https://crossplatformsweden.github.io/react-native-components/interfaces/_components_buttons_crossbutton_.icrossbuttonprops.html

example

<CognitoLogin buttonProps={{mode: 'contained'}}> Custom layouts here

Optional cancelButtonProps

cancelButtonProps: ICrossButtonProps | undefined

Optional props for the cancel button. Typically used to change the title prop.

Read more: https://crossplatformsweden.github.io/react-native-components/interfaces/_components_buttons_crossbutton_.icrossbuttonprops.html

example

<CognitoLogin cancelButtonProps={{title: 'Disengage'}}> Custom layouts here

Optional confirmChildren

confirmChildren: ReactNode

Optional child components for the ConfirmForm

Optional emailInputProps

emailInputProps: ICrossEditorProps | undefined

Optional props for the e-mail input. Typically used to change the label prop. See {@link ICrossEditorProps}

Optional forgotChildren

forgotChildren: ReactNode

Optional child components for the ForgotForm (reset password)

Optional loginButtonProps

loginButtonProps: ICrossButtonProps | undefined

Optional props for the login button. Typically used to change the title prop.

Read more: https://crossplatformsweden.github.io/react-native-components/interfaces/_components_buttons_crossbutton_.icrossbuttonprops.html

example

<CognitoLogin loginButtonProps={{title: 'Engage'}}> Custom layouts here

Optional loginChildren

loginChildren: ReactNode

Optional child components for the LoginForm (username / password)

Optional onLoggedIn

onLoggedIn: undefined | function

Occurs when the user was successfully logged in and contains the resulting user.

Optional onRegisteredUser

onRegisteredUser: undefined | function

Occurs when the user was succcessfully registered and carries the user object.

Optional passwordInputProps

passwordInputProps: ICrossEditorProps | undefined

Optional props for the password input. Typically used to change the label prop. See {@link ICrossEditorProps}

Optional phoneInputProps

phoneInputProps: ICrossEditorProps | undefined

Optional props for the phone input. Typically used to change the label prop or change the maskProps. See {@link ICrossEditorProps}

Optional registerButtonProps

registerButtonProps: ICrossButtonProps | undefined

Optional props for the register button. Typically used to change the title prop.

Read more: https://crossplatformsweden.github.io/react-native-components/interfaces/_components_buttons_crossbutton_.icrossbuttonprops.html

example

<CognitoLogin registerButtonProps={{title: 'Enlist'}}> Custom layouts here

Optional registerChildren

registerChildren: ReactNode

Optional child components for the RegisterForm

Optional saveButtonProps

saveButtonProps: ICrossButtonProps | undefined

Optional props for the save button. Typically used to change the title prop.

Read more: https://crossplatformsweden.github.io/react-native-components/interfaces/_components_buttons_crossbutton_.icrossbuttonprops.html

example

<CognitoLogin saveButtonProps={{title: 'Warp'}}> Custom layouts here

Optional scrolViewStyle

scrolViewStyle: StyleProp<ViewStyle> | undefined

Optional custom style main ScrollView

Optional style

style: StyleProp<ViewStyle> | undefined

Optional custom style main View container

Optional testID

testID: string | undefined