diff --git a/frontend/src/component/feature/StrategyTypes/GeneralStrategy/GeneralStrategy.styles.ts b/frontend/src/component/feature/StrategyTypes/GeneralStrategy/GeneralStrategy.styles.ts
index 8693a7b480..75b187d585 100644
--- a/frontend/src/component/feature/StrategyTypes/GeneralStrategy/GeneralStrategy.styles.ts
+++ b/frontend/src/component/feature/StrategyTypes/GeneralStrategy/GeneralStrategy.styles.ts
@@ -1,13 +1,15 @@
import { makeStyles } from 'tss-react/mui';
export const useStyles = makeStyles()(theme => ({
+ container: {
+ display: 'grid',
+ gap: theme.spacing(4),
+ },
helpText: {
- color: 'rgba(0, 0, 0, 0.54)',
+ color: theme.palette.text.secondary,
fontSize: theme.fontSizes.smallerBody,
lineHeight: '14px',
- margin: '0.5rem 0',
- },
- generalSection: {
- margin: '1rem 0',
+ margin: 0,
+ marginTop: theme.spacing(1),
},
}));
diff --git a/frontend/src/component/feature/StrategyTypes/GeneralStrategy/GeneralStrategy.tsx b/frontend/src/component/feature/StrategyTypes/GeneralStrategy/GeneralStrategy.tsx
index fa9639cff0..75b782b170 100644
--- a/frontend/src/component/feature/StrategyTypes/GeneralStrategy/GeneralStrategy.tsx
+++ b/frontend/src/component/feature/StrategyTypes/GeneralStrategy/GeneralStrategy.tsx
@@ -53,14 +53,13 @@ const GeneralStrategy = ({
}
return (
- <>
+
{strategyDefinition.parameters.map(
({ name, type, description, required }) => {
if (type === 'percentage') {
const value = parseParameterNumber(parameters[name]);
return (
-
0 ? !regex.test(value) : false;
return (
-
+
+
+
+
);
};
diff --git a/frontend/src/component/feature/StrategyTypes/StrategyInputList/StrategyInputList.tsx b/frontend/src/component/feature/StrategyTypes/StrategyInputList/StrategyInputList.tsx
index 51b0529684..ffd22ad756 100644
--- a/frontend/src/component/feature/StrategyTypes/StrategyInputList/StrategyInputList.tsx
+++ b/frontend/src/component/feature/StrategyTypes/StrategyInputList/StrategyInputList.tsx
@@ -1,5 +1,12 @@
import React, { ChangeEvent, useState } from 'react';
-import { Button, Chip, TextField, Typography } from '@mui/material';
+import {
+ Button,
+ Chip,
+ TextField,
+ Typography,
+ styled,
+ TextFieldProps,
+} from '@mui/material';
import { Add } from '@mui/icons-material';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { ADD_TO_STRATEGY_INPUT_LIST, STRATEGY_INPUT_LIST } from 'utils/testIds';
@@ -12,6 +19,21 @@ interface IStrategyInputList {
disabled: boolean;
}
+const Container = styled('div')(({ theme }) => ({
+ display: 'grid',
+ gap: theme.spacing(1),
+}));
+
+const ChipsList = styled('div')(({ theme }) => ({
+ display: 'flex',
+ gap: theme.spacing(1),
+}));
+
+const InputContainer = styled('div')(({ theme }) => ({
+ display: 'flex',
+ gap: theme.spacing(1),
+}));
+
const StrategyInputList = ({
name,
list,
@@ -61,49 +83,42 @@ const StrategyInputList = ({
);
};
- // @ts-expect-error
- const onChange = e => {
- setInput(e.currentTarget.value);
+ const onChange: TextFieldProps['onChange'] = event => {
+ setInput(event.currentTarget.value);
};
return (
-
+
List of {name}
-
- {list.map((entryValue, index) => (
- 0}
+ show={
+
+ {list.map((entryValue, index) => (
+
+ }
+ onDelete={
+ disabled ? undefined : () => onClose(index)
+ }
+ title="Remove value"
/>
- }
- style={{ marginRight: '3px' }}
- onDelete={disabled ? undefined : () => onClose(index)}
- title="Remove value"
- />
- ))}
-
+ ))}
+
+ }
+ />
+
Add
-
+
}
/>
-
+
);
};