diff --git a/web/src/features/dialog/AlertDialog.tsx b/web/src/features/dialog/AlertDialog.tsx
index a6643a8..a828ec0 100644
--- a/web/src/features/dialog/AlertDialog.tsx
+++ b/web/src/features/dialog/AlertDialog.tsx
@@ -57,13 +57,7 @@ const AlertDialog: React.FC = () => {
{dialogData.content}
{dialogData.cancel && (
-
+
>
);
diff --git a/web/src/features/dialog/components/fields/checkbox.tsx b/web/src/features/dialog/components/fields/checkbox.tsx
index 6c36afc..bab6483 100644
--- a/web/src/features/dialog/components/fields/checkbox.tsx
+++ b/web/src/features/dialog/components/fields/checkbox.tsx
@@ -1,7 +1,6 @@
-import { Box, Checkbox, HStack, Text } from '@chakra-ui/react';
+import { Checkbox } from '@mantine/core';
import { useEffect } from 'react';
import { ICheckbox } from '../../../../interfaces/dialog';
-import Label from '../Label';
interface Props {
row: ICheckbox;
@@ -15,16 +14,12 @@ const CheckboxField: React.FC = (props) => {
}, []);
return (
- <>
-
- ) => props.handleChange(e.target.checked, props.index)}
- defaultChecked={props.row.checked}
- >
-
-
-
- >
+ ) => props.handleChange(e.target.checked, props.index)}
+ defaultChecked={props.row.checked}
+ />
);
};
diff --git a/web/src/features/dialog/components/fields/input.tsx b/web/src/features/dialog/components/fields/input.tsx
index 0535e0f..5347d91 100644
--- a/web/src/features/dialog/components/fields/input.tsx
+++ b/web/src/features/dialog/components/fields/input.tsx
@@ -1,8 +1,7 @@
-import { Box, InputGroup, InputLeftElement, InputRightElement, Input } from '@chakra-ui/react';
+import { TextInput } from '@mantine/core';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useEffect } from 'react';
import { IInput } from '../../../../interfaces/dialog';
-import Label from '../Label';
interface Props {
row: IInput;
@@ -18,37 +17,25 @@ const InputField: React.FC = (props) => {
}, []);
return (
- <>
-
-
-
- {props.row.icon && (
- } />
- )}
- ) => props.handleChange(e.target.value, props.index)}
- placeholder={props.row.placeholder}
- defaultValue={props.row.default}
- type={!props.row.password || props.passwordStates[props.index] ? 'text' : 'password'}
- isDisabled={props.row.disabled}
+ }
+ placeholder={props.row.placeholder}
+ defaultValue={props.row.default}
+ disabled={props.row.disabled}
+ type={!props.row.password || props.passwordStates[props.index] ? 'text' : 'password'}
+ rightSection={
+ props.row.password && (
+ props.handlePasswordStates(props.index)}
+ cursor="pointer"
+ icon={props.passwordStates[props.index] ? 'eye' : 'eye-slash'}
+ fixedWidth
/>
- {props.row.password && (
- props.handlePasswordStates(props.index)}
- children={
-
- }
- />
- )}
-
-
- >
+ )
+ }
+ />
);
};
diff --git a/web/src/features/dialog/components/fields/number.tsx b/web/src/features/dialog/components/fields/number.tsx
index 4a82969..f3c3049 100644
--- a/web/src/features/dialog/components/fields/number.tsx
+++ b/web/src/features/dialog/components/fields/number.tsx
@@ -1,17 +1,7 @@
-import {
- Box,
- NumberInput,
- NumberInputField,
- NumberInputStepper,
- NumberIncrementStepper,
- NumberDecrementStepper,
- InputLeftElement,
- InputGroup,
-} from '@chakra-ui/react';
+import { NumberInput } from '@mantine/core';
import { useEffect } from 'react';
import { INumber } from '../../../../interfaces/dialog';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import Label from '../Label';
interface Props {
row: INumber;
@@ -25,28 +15,16 @@ const NumberField: React.FC = (props) => {
}, []);
return (
-
-
-
- props.handleChange(+val, props.index)}
- defaultValue={props.row.default}
- min={props.row.min}
- max={props.row.max}
- isDisabled={props.row.disabled}
- w="100%"
- >
- {props.row.icon && (
- } />
- )}
-
-
-
-
-
-
-
-
+ props.handleChange(value as number, props.index)}
+ icon={props.row.icon && }
+ />
);
};
diff --git a/web/src/features/dialog/components/fields/select.tsx b/web/src/features/dialog/components/fields/select.tsx
index 28b7dea..7626667 100644
--- a/web/src/features/dialog/components/fields/select.tsx
+++ b/web/src/features/dialog/components/fields/select.tsx
@@ -1,4 +1,4 @@
-import { Box, Select } from '@chakra-ui/react';
+import { Select } from '@mantine/core';
import { useEffect } from 'react';
import { ISelect } from '../../../../interfaces/dialog';
@@ -8,6 +8,7 @@ interface Props {
handleChange: (value: string, index: number) => void;
}
+// TODO: set label to value of value when there is no label provided
const SelectField: React.FC = (props) => {
useEffect(() => {
if (props.row.default) {
@@ -20,27 +21,14 @@ const SelectField: React.FC = (props) => {
}, []);
return (
- <>
-
-
-
- >
+