1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-13 13:48:59 +02:00

Remove shouldExpand prop

This commit is contained in:
Thomas Heartman 2025-03-31 12:21:17 +02:00
parent 9de0e7435b
commit 1807ac0163
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78
2 changed files with 0 additions and 6 deletions

View File

@ -29,14 +29,12 @@ const StyledExpandItem = styled('div')(({ theme }) => ({
interface ConstraintAccordionViewHeaderMetaInfoProps { interface ConstraintAccordionViewHeaderMetaInfoProps {
constraint: IConstraint; constraint: IConstraint;
expanded: boolean; expanded: boolean;
allowExpand: (shouldExpand: boolean) => void;
disabled?: boolean; disabled?: boolean;
maxLength?: number; maxLength?: number;
} }
export const ConstraintAccordionViewHeaderInfo = ({ export const ConstraintAccordionViewHeaderInfo = ({
constraint, constraint,
allowExpand,
expanded, expanded,
}: ConstraintAccordionViewHeaderMetaInfoProps) => { }: ConstraintAccordionViewHeaderMetaInfoProps) => {
const [expandable, setExpandable] = useState(false); const [expandable, setExpandable] = useState(false);
@ -48,7 +46,6 @@ export const ConstraintAccordionViewHeaderInfo = ({
{...constraint} {...constraint}
onSetTruncated={(state: boolean) => { onSetTruncated={(state: boolean) => {
setExpandable(state); setExpandable(state);
allowExpand(state);
}} }}
viewMore={ viewMore={
expandable ? ( expandable ? (

View File

@ -93,9 +93,6 @@ export const SegmentItem: FC<SegmentItemProps> = ({
<ConstraintAccordionViewHeaderInfo <ConstraintAccordionViewHeaderInfo
constraint={constraint} constraint={constraint}
expanded={isOpen} expanded={isOpen}
allowExpand={(shouldExpand) =>
setIsOpen(shouldExpand)
}
/> />
</ConstraintListItem> </ConstraintListItem>
))} ))}