mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-28 17:55:15 +02:00
* style fixes * Constraint card styling adjustments * Style Fixes * lint and fmt * lint and fmt * Changed the way the expandable property is evaluated to use the text.length Co-authored-by: Tymoteusz Czech <tymek+gpg@getunleash.ai>
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import { IConstraint } from 'interfaces/strategy';
|
|
import { useStyles } from 'component/common/ConstraintAccordion/ConstraintAccordion.styles';
|
|
import { formatConstraintValue } from 'utils/formatConstraintValue';
|
|
import { useLocationSettings } from 'hooks/useLocationSettings';
|
|
import { MultipleValues } from './MultipleValues/MultipleValues';
|
|
import { SingleValue } from './SingleValue/SingleValue';
|
|
|
|
interface IConstraintAccordionViewBodyProps {
|
|
constraint: IConstraint;
|
|
}
|
|
|
|
export const ConstraintAccordionViewBody = ({
|
|
constraint,
|
|
}: IConstraintAccordionViewBodyProps) => {
|
|
const { classes: styles } = useStyles();
|
|
const { locationSettings } = useLocationSettings();
|
|
|
|
return (
|
|
<div>
|
|
<div className={styles.valuesContainer}>
|
|
<MultipleValues values={constraint.values} />
|
|
<SingleValue
|
|
value={formatConstraintValue(constraint, locationSettings)}
|
|
operator={constraint.operator}
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|