debian-image-builder-frontend/src/Components/CreateImageWizard/steps/Users/index.tsx
Michal Gold d0f2317649 wizard: add user information step (HMS-4903)
This commit introduces the user information step with the following fields:
(*) `userName` field
(*) `password` field
(*) add unit tests for create and edit mode
2024-12-20 12:35:15 -06:00

25 lines
623 B
TypeScript

import React from 'react';
import { Form, Text, Title } from '@patternfly/react-core';
import EmptyUserState from './component/Empty';
import UserInfo from './component/UserInfo';
import { useAppSelector } from '../../../../store/hooks';
import { selectUsers } from '../../../../store/wizardSlice';
const UsersStep = () => {
const users = useAppSelector(selectUsers);
return (
<Form>
<Title headingLevel="h1" size="xl">
Users
</Title>
<Text>Add a user to your image.</Text>
{users.length !== 0 ? <UserInfo /> : <EmptyUserState />}
</Form>
);
};
export default UsersStep;