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:
parent
9de0e7435b
commit
1807ac0163
@ -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 ? (
|
||||||
|
@ -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>
|
||||||
))}
|
))}
|
||||||
|
Loading…
Reference in New Issue
Block a user