mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
chore: use explicit images for inverted operator rather than a boolean not operator (#5565)
This commit is contained in:
parent
e89ebf358e
commit
0e5861ac33
@ -1,3 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.10831 2.60839C3.71687 2.23054 3.09322 2.23475 2.70696 2.62102C2.31643 3.01154 2.31643 3.64471 2.70696 4.03523L10.414 11.7423L10.6238 13.7566C10.6974 14.4631 11.293 14.9998 12.0033 14.9998C12.4551 14.9998 12.8605 14.7827 13.1147 14.4429L19.6775 21.0058C20.068 21.3963 20.7012 21.3963 21.0917 21.0058C21.478 20.6195 21.4822 19.9959 21.1044 19.6044C21.1001 19.6003 21.0958 19.5961 21.0916 19.5919L4.12102 2.62132C4.11674 2.61704 4.1125 2.61273 4.10831 2.60839ZM13.8264 9.4983L14.2443 5.4864C14.3828 4.15689 13.34 2.99985 12.0033 2.99985C10.6859 2.99985 9.65401 4.12375 9.7571 5.42898L13.8264 9.4983ZM12.0033 16.9998C11.0368 16.9998 10.2533 17.7834 10.2533 18.7498C10.2533 19.7163 11.0368 20.4998 12.0033 20.4998C12.9698 20.4998 13.7533 19.7163 13.7533 18.7498C13.7533 17.7834 12.9698 16.9998 12.0033 16.9998Z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 972 B |
@ -1,3 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.0033 3C10.6666 3 9.62387 4.15704 9.76236 5.48654L10.6238 13.7567C10.6974 14.4633 11.293 15 12.0033 15C12.7137 15 13.3093 14.4633 13.3829 13.7567L14.2443 5.48655C14.3828 4.15704 13.34 3 12.0033 3ZM12.0033 17C11.0368 17 10.2533 17.7835 10.2533 18.75C10.2533 19.7165 11.0368 20.5 12.0033 20.5C12.9698 20.5 13.7533 19.7165 13.7533 18.75C13.7533 17.7835 12.9698 17 12.0033 17Z" />
|
||||
</svg>
|
Before Width: | Height: | Size: 540 B |
5
frontend/src/assets/icons/not_operator_selected.svg
Normal file
5
frontend/src/assets/icons/not_operator_selected.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="24" height="10" viewBox="0 0 24 10" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M20.9238 0.46875V9H19.1719V0.46875H20.9238ZM23.5488 0.46875V1.8457H16.5879V0.46875H23.5488Z"/>
|
||||
<path d="M16.2422 4.53516V4.93945C16.2422 5.58789 16.1543 6.16992 15.9785 6.68555C15.8027 7.20117 15.5547 7.64062 15.2344 8.00391C14.9141 8.36328 14.5312 8.63867 14.0859 8.83008C13.6445 9.02148 13.1543 9.11719 12.6152 9.11719C12.0801 9.11719 11.5898 9.02148 11.1445 8.83008C10.7031 8.63867 10.3203 8.36328 9.99609 8.00391C9.67188 7.64062 9.41992 7.20117 9.24023 6.68555C9.06445 6.16992 8.97656 5.58789 8.97656 4.93945V4.53516C8.97656 3.88281 9.06445 3.30078 9.24023 2.78906C9.41602 2.27344 9.66406 1.83398 9.98438 1.4707C10.3086 1.10742 10.6914 0.830078 11.1328 0.638672C11.5781 0.447266 12.0684 0.351562 12.6035 0.351562C13.1426 0.351562 13.6328 0.447266 14.0742 0.638672C14.5195 0.830078 14.9023 1.10742 15.2227 1.4707C15.5469 1.83398 15.7969 2.27344 15.9727 2.78906C16.1523 3.30078 16.2422 3.88281 16.2422 4.53516ZM14.4668 4.93945V4.52344C14.4668 4.07031 14.4258 3.67188 14.3438 3.32812C14.2617 2.98438 14.1406 2.69531 13.9805 2.46094C13.8203 2.22656 13.625 2.05078 13.3945 1.93359C13.1641 1.8125 12.9004 1.75195 12.6035 1.75195C12.3066 1.75195 12.043 1.8125 11.8125 1.93359C11.5859 2.05078 11.3926 2.22656 11.2324 2.46094C11.0762 2.69531 10.957 2.98438 10.875 3.32812C10.793 3.67188 10.752 4.07031 10.752 4.52344V4.93945C10.752 5.38867 10.793 5.78711 10.875 6.13477C10.957 6.47852 11.0781 6.76953 11.2383 7.00781C11.3984 7.24219 11.5938 7.41992 11.8242 7.54102C12.0547 7.66211 12.3184 7.72266 12.6152 7.72266C12.9121 7.72266 13.1758 7.66211 13.4062 7.54102C13.6367 7.41992 13.8301 7.24219 13.9863 7.00781C14.1426 6.76953 14.2617 6.47852 14.3438 6.13477C14.4258 5.78711 14.4668 5.38867 14.4668 4.93945Z"/>
|
||||
<path d="M7.70508 0.46875V9H5.94727L2.51953 3.28125V9H0.761719V0.46875H2.51953L5.95312 6.19336V0.46875H7.70508Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
3
frontend/src/assets/icons/not_operator_unselected.svg
Normal file
3
frontend/src/assets/icons/not_operator_unselected.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="24" height="36" viewBox="25 12 24 30" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M44.2145 31H45.9238V23.8457H48.5488V22.4688H45.9238H44.1719H41.5879V23.8457H44.1719V30.9574L44.2145 31ZM39.1419 28.7274L40.3188 29.9043C40.3146 29.9095 40.3104 29.9147 40.3061 29.9198L46.2004 35.8141L44.8004 37.2141L38.5868 31.0005C38.2828 31.0783 37.9589 31.1172 37.6152 31.1172C37.0801 31.1172 36.5898 31.0215 36.1445 30.8301C35.7031 30.6387 35.3203 30.3633 34.9961 30.0039C34.6719 29.6406 34.4199 29.2012 34.2402 28.6855C34.0645 28.1699 33.9766 27.5879 33.9766 26.9395V26.5352C33.9766 26.4869 33.977 26.4391 33.978 26.3917L32.7051 25.1188V31H30.9473L27.5195 25.2812V31H25.7617V22.4688H27.5195L30.9531 28.1934V23.3668L26.4004 18.8141L27.8004 17.4141L34.5229 24.1366C34.5262 24.1305 34.5295 24.1244 34.5328 24.1183L35.8509 25.4364C35.8493 25.4442 35.8477 25.452 35.8461 25.4598L37.0004 26.6141L39.1328 28.7465C39.1359 28.7402 39.1389 28.7338 39.1419 28.7274ZM39.4614 26.247L41.1626 27.9481C41.2157 27.632 41.2422 27.2957 41.2422 26.9395V26.5352C41.2422 25.8828 41.1523 25.3008 40.9727 24.7891C40.7969 24.2734 40.5469 23.834 40.2227 23.4707C39.9023 23.1074 39.5195 22.8301 39.0742 22.6387C38.6328 22.4473 38.1426 22.3516 37.6035 22.3516C37.0684 22.3516 36.5781 22.4473 36.1328 22.6387C36.0682 22.6667 36.0048 22.6966 35.9427 22.7283L37.0488 23.8344C37.2187 23.7794 37.4036 23.752 37.6035 23.752C37.9004 23.752 38.1641 23.8125 38.3945 23.9336C38.625 24.0508 38.8203 24.2266 38.9805 24.4609C39.1406 24.6953 39.2617 24.9844 39.3438 25.3281C39.4087 25.6002 39.4479 25.9065 39.4614 26.247ZM37.281 29.6947L35.9324 28.346C36.0101 28.5994 36.112 28.82 36.2383 29.0078C36.3984 29.2422 36.5938 29.4199 36.8242 29.541C36.9642 29.6146 37.1165 29.6658 37.281 29.6947Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
@ -1,6 +1,6 @@
|
||||
import { Box, Tooltip } from '@mui/material';
|
||||
import { ReactComponent as NegatedIcon } from 'assets/icons/24_Negator.svg';
|
||||
import { ReactComponent as NegatedIconOff } from 'assets/icons/24_Negator off.svg';
|
||||
import { ReactComponent as NegatedOnIcon } from 'assets/icons/not_operator_selected.svg';
|
||||
import { ReactComponent as NegatedOffIcon } from 'assets/icons/not_operator_unselected.svg';
|
||||
import { IConstraint } from 'interfaces/strategy';
|
||||
import {
|
||||
StyledToggleButtonOff,
|
||||
@ -30,7 +30,7 @@ export const InvertedOperatorButton = ({
|
||||
onClick={setInvertedOperator}
|
||||
disableRipple
|
||||
>
|
||||
<NegatedIcon />
|
||||
<NegatedOnIcon />
|
||||
</StyledToggleButtonOn>
|
||||
}
|
||||
elseShow={
|
||||
@ -38,7 +38,7 @@ export const InvertedOperatorButton = ({
|
||||
onClick={setInvertedOperator}
|
||||
disableRipple
|
||||
>
|
||||
<NegatedIconOff />
|
||||
<NegatedOffIcon />
|
||||
</StyledToggleButtonOff>
|
||||
}
|
||||
/>
|
||||
|
@ -2,11 +2,12 @@ import { IConstraint } from 'interfaces/strategy';
|
||||
import { ConditionallyRender } from '../../../ConditionallyRender/ConditionallyRender';
|
||||
import { Tooltip, Box, styled } from '@mui/material';
|
||||
import { stringOperators } from 'constants/operators';
|
||||
import { ReactComponent as NegatedIcon } from 'assets/icons/24_Negator.svg';
|
||||
import { ReactComponent as NegatedOnIcon } from 'assets/icons/not_operator_selected.svg';
|
||||
import { ConstraintOperator } from '../../ConstraintOperator/ConstraintOperator';
|
||||
import { StyledIconWrapper } from './StyledIconWrapper';
|
||||
import { ReactComponent as CaseSensitive } from 'assets/icons/24_Text format.svg';
|
||||
import { oneOf } from 'utils/oneOf';
|
||||
import { useTheme } from '@mui/material';
|
||||
|
||||
interface ConstraintViewHeaderOperatorProps {
|
||||
constraint: IConstraint;
|
||||
@ -31,6 +32,7 @@ export const ConstraintViewHeaderOperator = ({
|
||||
constraint,
|
||||
disabled = false,
|
||||
}: ConstraintViewHeaderOperatorProps) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<StyledHeaderValuesContainerWrapper>
|
||||
<ConditionallyRender
|
||||
@ -39,7 +41,7 @@ export const ConstraintViewHeaderOperator = ({
|
||||
<Tooltip title={'Operator is negated'} arrow>
|
||||
<Box sx={{ display: 'flex' }}>
|
||||
<StyledIconWrapper isPrefix>
|
||||
<NegatedIcon />
|
||||
<NegatedOnIcon />
|
||||
</StyledIconWrapper>
|
||||
</Box>
|
||||
</Tooltip>
|
||||
|
@ -16,7 +16,10 @@ export const StyledIconWrapperBase = styled('div')<{
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
}));
|
||||
|
||||
const StyledPrefixIconWrapper = styled(StyledIconWrapperBase)(() => ({
|
||||
const StyledPrefixIconWrapper = styled(StyledIconWrapperBase)(({ theme }) => ({
|
||||
width: 'auto',
|
||||
paddingLeft: theme.spacing(1),
|
||||
paddingRight: theme.spacing(1),
|
||||
marginLeft: 0,
|
||||
borderTopRightRadius: 0,
|
||||
borderBottomRightRadius: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user