UNPKG

@brightlayer-ui/react-auth-workflow

Version:

Re-usable workflow components for Authentication and Registration within Eaton applications.

23 lines (22 loc) 1.48 kB
/* eslint-disable @typescript-eslint/explicit-function-return-type */ import React from 'react'; import { WorkflowCard, WorkflowCardActions, WorkflowCardBody, WorkflowCardHeader, WorkflowCardInstructions, } from '../../components/index.js'; import { SetPassword } from '../../components/SetPassword/index.js'; import ErrorManager from '../../components/Error/ErrorManager.js'; /** * The component renders a screen with the password and confirm password field for creating a new password. * * @param {CreatePasswordScreenProps} props - props of CreatePasswordScreen base component * * @category Component */ export const CreatePasswordScreenBase = (props) => { const { errorDisplayConfig, WorkflowCardBaseProps: cardBaseProps = {}, WorkflowCardInstructionProps: instructionsProps = {}, WorkflowCardActionsProps: actionsProps = {}, WorkflowCardHeaderProps: headerProps = {}, PasswordProps: passwordProps = { onPasswordChange: () => ({}) }, ...otherProps } = props; return (React.createElement(WorkflowCard, { ...cardBaseProps, ...otherProps }, React.createElement(WorkflowCardHeader, { ...headerProps }), React.createElement(WorkflowCardInstructions, { ...instructionsProps }), React.createElement(WorkflowCardBody, null, React.createElement(ErrorManager, { ...errorDisplayConfig }, React.createElement(SetPassword, { ...passwordProps }))), React.createElement(WorkflowCardActions, { ...actionsProps }))); };