diff --git a/frontend/src/assets/icons/case-insensitive.svg b/frontend/src/assets/icons/case-insensitive.svg new file mode 100644 index 0000000000..ec9af26955 --- /dev/null +++ b/frontend/src/assets/icons/case-insensitive.svg @@ -0,0 +1 @@ + diff --git a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyConstraints/EditableConstraint.tsx b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyConstraints/EditableConstraint.tsx index fb15f59cb5..389b9268a9 100644 --- a/frontend/src/component/feature/FeatureStrategy/FeatureStrategyConstraints/EditableConstraint.tsx +++ b/frontend/src/component/feature/FeatureStrategy/FeatureStrategyConstraints/EditableConstraint.tsx @@ -40,6 +40,9 @@ import { ConstraintOperatorSelect } from './ConstraintOperatorSelect'; import { HtmlTooltip } from 'component/common/HtmlTooltip/HtmlTooltip'; import Delete from '@mui/icons-material/Delete'; import { ValueList } from './ValueList'; +import { ReactComponent as CaseSensitiveIcon } from 'assets/icons/case-sensitive.svg'; +import { ReactComponent as CaseInsensitiveIcon } from 'assets/icons/case-insensitive.svg'; +import { ScreenReaderOnly } from 'component/common/ScreenReaderOnly/ScreenReaderOnly'; const Container = styled('article')(({ theme }) => ({ '--padding': theme.spacing(2), @@ -123,6 +126,23 @@ const StyledButton = styled('button')(({ theme }) => ({ }, })); +const StyledCaseInsensitiveIcon = styled(CaseInsensitiveIcon)(({ theme }) => ({ + path: { + fill: theme.palette.text.disabled, + }, + rect: { + fill: theme.palette.text.secondary, + }, +})); +const StyledCaseSensitiveIcon = styled(CaseSensitiveIcon)(({ theme }) => ({ + fill: 'currentcolor', +})); + +const CaseButton = styled(StyledButton)(({ theme }) => ({ + display: 'grid', + placeItems: 'center', +})); + type Props = { localConstraint: IConstraint; setContextName: (contextName: string) => void; @@ -371,12 +391,23 @@ export const EditableConstraint: FC = ({ /> {showCaseSensitiveButton ? ( - - {localConstraint.caseInsensitive ? 'Aa' : 'A/a'} - + {localConstraint.caseInsensitive ? ( + + ) : ( + + )} + + Make match + {localConstraint.caseInsensitive + ? ' ' + : ' not '} + case sensitive + + ) : null} {!input.includes('LEGAL_VALUES') && (