mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-09 13:47:13 +02:00
Remove shouldExpand prop
This commit is contained in:
parent
9de0e7435b
commit
1807ac0163
@ -29,14 +29,12 @@ const StyledExpandItem = styled('div')(({ theme }) => ({
|
||||
interface ConstraintAccordionViewHeaderMetaInfoProps {
|
||||
constraint: IConstraint;
|
||||
expanded: boolean;
|
||||
allowExpand: (shouldExpand: boolean) => void;
|
||||
disabled?: boolean;
|
||||
maxLength?: number;
|
||||
}
|
||||
|
||||
export const ConstraintAccordionViewHeaderInfo = ({
|
||||
constraint,
|
||||
allowExpand,
|
||||
expanded,
|
||||
}: ConstraintAccordionViewHeaderMetaInfoProps) => {
|
||||
const [expandable, setExpandable] = useState(false);
|
||||
@ -48,7 +46,6 @@ export const ConstraintAccordionViewHeaderInfo = ({
|
||||
{...constraint}
|
||||
onSetTruncated={(state: boolean) => {
|
||||
setExpandable(state);
|
||||
allowExpand(state);
|
||||
}}
|
||||
viewMore={
|
||||
expandable ? (
|
||||
|
@ -93,9 +93,6 @@ export const SegmentItem: FC<SegmentItemProps> = ({
|
||||
<ConstraintAccordionViewHeaderInfo
|
||||
constraint={constraint}
|
||||
expanded={isOpen}
|
||||
allowExpand={(shouldExpand) =>
|
||||
setIsOpen(shouldExpand)
|
||||
}
|
||||
/>
|
||||
</ConstraintListItem>
|
||||
))}
|
||||
|
Loading…
Reference in New Issue
Block a user