This commit introduces the user information step with the following fields: (*) `userName` field (*) `password` field (*) add unit tests for create and edit mode
38 lines
880 B
TypeScript
38 lines
880 B
TypeScript
import React from 'react';
|
|
|
|
import {
|
|
Button,
|
|
EmptyState,
|
|
EmptyStateFooter,
|
|
EmptyStateHeader,
|
|
EmptyStateIcon,
|
|
EmptyStateVariant,
|
|
} from '@patternfly/react-core';
|
|
import UserIcon from '@patternfly/react-icons/dist/esm/icons/user-icon';
|
|
|
|
import { useAppDispatch } from '../../../../../store/hooks';
|
|
import { addUser } from '../../../../../store/wizardSlice';
|
|
|
|
const EmptyUserState = () => {
|
|
const dispatch = useAppDispatch();
|
|
|
|
const onAddUserClick = () => {
|
|
dispatch(addUser());
|
|
};
|
|
|
|
return (
|
|
<EmptyState variant={EmptyStateVariant.lg}>
|
|
<EmptyStateHeader
|
|
icon={<EmptyStateIcon icon={UserIcon} />}
|
|
headingLevel="h4"
|
|
/>
|
|
<EmptyStateFooter>
|
|
<Button variant="secondary" onClick={onAddUserClick}>
|
|
Add a user
|
|
</Button>
|
|
</EmptyStateFooter>
|
|
</EmptyState>
|
|
);
|
|
};
|
|
|
|
export default EmptyUserState;
|