Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/5576 add emptystateprops in success screen #444

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const ForgotPasswordScreenBaseExample: React.FC = () => {
totalSteps: 0,
}}
SuccessScreenProps={{
emptyStateProps: {
EmptyStateProps: {
icon: { name: 'check-circle' },
title: t('bluiCommon:MESSAGES.EMAIL_SENT'),
description: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const ResetPasswordScreenBaseExample: React.FC = () => {
},
}}
SuccessScreenProps={{
emptyStateProps: {
EmptyStateProps: {
icon: { name: 'check-circle' },
title: t('bluiAuth:PASSWORD_RESET.SUCCESS_MESSAGE'),
description: t('bluiAuth:CHANGE_PASSWORD.SUCCESS_MESSAGE'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const ChangePasswordScreen: React.FC<ChangePasswordScreenProps> = (props)
slots={slots}
slotProps={{
SuccessScreen: {
emptyStateProps: {
EmptyStateProps: {
icon: { family: 'material', name: 'check-circle' },
title: t('bluiAuth:PASSWORD_RESET.SUCCESS_MESSAGE'),
description: t('bluiAuth:CHANGE_PASSWORD.SUCCESS_MESSAGE'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ExistingAccountSuccessScreen: React.FC<SuccessScreenProps> = (props
WorkflowCardHeaderProps,
WorkflowCardActionsProps,
WorkflowCardBodyProps,
emptyStateProps,
EmptyStateProps,
...otherExistingAccountSuccessScreenProps
} = props;

Expand Down Expand Up @@ -56,15 +56,15 @@ export const ExistingAccountSuccessScreen: React.FC<SuccessScreenProps> = (props
icon: icon,
title: t('bluiCommon:MESSAGES.WELCOME'),
description: t('bluiRegistration:REGISTRATION.SUCCESS_EXISTING'),
...emptyStateProps,
...EmptyStateProps,
};

return (
<SuccessScreenBase
WorkflowCardHeaderProps={workflowCardHeaderProps}
WorkflowCardActionsProps={workflowCardActionsProps}
WorkflowCardBodyProps={workflowCardBodyProps}
emptyStateProps={emptyStatesProps}
EmptyStateProps={emptyStatesProps}
{...otherExistingAccountSuccessScreenProps}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const RegistrationSuccessScreen: React.FC<SuccessScreenProps> = (props) =
WorkflowCardHeaderProps,
WorkflowCardActionsProps,
WorkflowCardBodyProps,
emptyStateProps,
EmptyStateProps,
...otherRegistrationSuccessScreenProps
} = props;

Expand Down Expand Up @@ -81,7 +81,7 @@ export const RegistrationSuccessScreen: React.FC<SuccessScreenProps> = (props) =
</Trans>
</Text>
),
...emptyStateProps,
...EmptyStateProps,
};

const workflowCardBodyProps = {
Expand All @@ -107,7 +107,7 @@ export const RegistrationSuccessScreen: React.FC<SuccessScreenProps> = (props) =
WorkflowCardHeaderProps={workflowCardHeaderProps}
WorkflowCardActionsProps={workflowCardActionsProps}
WorkflowCardBodyProps={workflowCardBodyProps}
emptyStateProps={emptyStatesProps}
EmptyStateProps={emptyStatesProps}
{...otherRegistrationSuccessScreenProps}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const makeStyles = (): StyleSheet.NamedStyles<{
*/

export const SuccessScreenBase: React.FC<SuccessScreenProps> = (props) => {
const { dismissButtonLabel = '', canDismiss, onDismiss, emptyStateProps } = props;
const { dismissButtonLabel = '', canDismiss, onDismiss, EmptyStateProps } = props;

const cardBaseProps = props.WorkflowCardBaseProps || {};
const headerProps = props.WorkflowCardHeaderProps || {};
Expand All @@ -46,7 +46,7 @@ export const SuccessScreenBase: React.FC<SuccessScreenProps> = (props) => {
{Object.keys(instructionsProps).length !== 0 && <WorkflowCardInstructions {...instructionsProps} />}
<WorkflowCardBody scrollable={false} {...bodyProps}>
<View style={[styles.emptyStateContainer]}>
{emptyStateProps && <EmptyState {...emptyStateProps} />}
{EmptyStateProps && <EmptyState {...EmptyStateProps} />}
</View>
</WorkflowCardBody>
<WorkflowCardActions
Expand Down
2 changes: 1 addition & 1 deletion login-workflow/src/screens/SuccessScreen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type SuccessScreenProps = WorkflowCardProps & {
/**
* To pass EmptyStateProps i.e icon, title, description... etc
*/
emptyStateProps?: EmptyStateProps;
EmptyStateProps?: EmptyStateProps;

/**
* To display label for the button
Expand Down
Loading