diff --git a/frontend/src/component/common/PercentageCircle/PercentageCircle.tsx b/frontend/src/component/common/PercentageCircle/PercentageCircle.tsx index 0a21250267..60b7ea86bf 100644 --- a/frontend/src/component/common/PercentageCircle/PercentageCircle.tsx +++ b/frontend/src/component/common/PercentageCircle/PercentageCircle.tsx @@ -1,51 +1,45 @@ import { useTheme } from '@mui/material'; +import { CSSProperties } from 'react'; interface IPercentageCircleProps { - styles?: object; percentage: number; - secondaryPieColor?: string; - className?: string; - hideNumber?: boolean; + size?: `${number}rem`; } const PercentageCircle = ({ - styles, percentage, - secondaryPieColor, - hideNumber, - ...rest + size = '4rem', }: IPercentageCircleProps) => { const theme = useTheme(); - let circle = { - height: '65px', - width: '65px', - borderRadius: '50%', - color: '#fff', - backgroundColor: theme.palette.grey[200], - backgroundImage: `conic-gradient(${ - theme.palette.primary.light - } ${percentage}%, ${secondaryPieColor || theme.palette.grey[200]} 1%)`, + const style: CSSProperties = { + display: 'block', + borderRadius: '100%', + transform: 'rotate(-90deg)', + height: size, + width: size, + background: theme.palette.grey[200], }; - if (percentage === 100) { - return ( -
What is your strategy description? diff --git a/frontend/src/component/strategies/StrategyForm/StrategyParameters/StrategyParameter/StrategyParameter.styles.ts b/frontend/src/component/strategies/StrategyForm/StrategyParameters/StrategyParameter/StrategyParameter.styles.ts index 9010162939..b09cfcb296 100644 --- a/frontend/src/component/strategies/StrategyForm/StrategyParameters/StrategyParameter/StrategyParameter.styles.ts +++ b/frontend/src/component/strategies/StrategyForm/StrategyParameters/StrategyParameter/StrategyParameter.styles.ts @@ -29,12 +29,6 @@ export const useStyles = makeStyles()(theme => ({ inputDescription: { marginBottom: '0.5rem', }, - typeDescription: { - fontSize: theme.fontSizes.smallBody, - color: theme.palette.grey[600], - top: '-13px', - position: 'relative', - }, errorMessage: { fontSize: theme.fontSizes.smallBody, color: theme.palette.error.main, diff --git a/frontend/src/component/strategies/StrategyForm/StrategyParameters/StrategyParameter/StrategyParameter.tsx b/frontend/src/component/strategies/StrategyForm/StrategyParameters/StrategyParameter/StrategyParameter.tsx index 55fc0ec9c0..940c4d6b0c 100644 --- a/frontend/src/component/strategies/StrategyForm/StrategyParameters/StrategyParameter/StrategyParameter.tsx +++ b/frontend/src/component/strategies/StrategyForm/StrategyParameters/StrategyParameter/StrategyParameter.tsx @@ -17,31 +17,22 @@ const paramTypesOptions = [ { key: 'string', label: 'string', - description: 'A string is a collection of characters', }, { key: 'percentage', label: 'percentage', - description: - 'Percentage is used when you want to make your feature visible to a process part of your customers', }, { key: 'list', label: 'list', - description: - 'A list is used when you want to define several parameters that must be met before your feature becomes visible to your customers', }, { key: 'number', label: 'number', - description: - 'Number is used when you have one or more digits that must be met for your feature to be visible to your customers', }, { key: 'boolean', label: 'boolean', - description: - 'A boolean value represents a truth value, which is either true or false', }, ]; @@ -68,11 +59,6 @@ export const StrategyParameter = ({ set({ type }); }; - const renderParamTypeDescription = () => { - return paramTypesOptions.find(param => param.key === input.type) - ?.description; - }; - return (
- The parameters define what the strategy will look like. + Parameters let you provide arguments to your strategy + that it can access for evaluation. Read more in the{' '} + + parameter types documentation + + .
} /> @@ -114,9 +109,6 @@ export const StrategyParameter = ({ id={`prop-type-${index}-select`} className={styles.input} /> -- {renderParamTypeDescription()} -