@inceptionbg/iui 2.0.21 → 2.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -61,12 +61,10 @@ export const Accordions: FC<Props> = ({
|
|
|
61
61
|
className="collapse-icon"
|
|
62
62
|
/>
|
|
63
63
|
</div>
|
|
64
|
-
<Collapse
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
>
|
|
69
|
-
{tab.component}
|
|
64
|
+
<Collapse isOpen={isOpen} keepContentInDom={keepContentInDom}>
|
|
65
|
+
<div className={clsx('iui-accordion-content', classNameContent)}>
|
|
66
|
+
{tab.component}
|
|
67
|
+
</div>
|
|
70
68
|
</Collapse>
|
|
71
69
|
</div>
|
|
72
70
|
);
|
|
@@ -6,7 +6,6 @@ interface Props {
|
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
keepContentInDom?: boolean;
|
|
8
8
|
className?: string;
|
|
9
|
-
classNameContent?: string;
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
export const Collapse: FC<Props> = ({
|
|
@@ -14,7 +13,6 @@ export const Collapse: FC<Props> = ({
|
|
|
14
13
|
children,
|
|
15
14
|
keepContentInDom,
|
|
16
15
|
className,
|
|
17
|
-
classNameContent,
|
|
18
16
|
}) => {
|
|
19
17
|
const [height, setHeight] = useState<number>();
|
|
20
18
|
const [isVisible, setIsVisible] = useState(isOpen);
|
|
@@ -48,9 +46,7 @@ export const Collapse: FC<Props> = ({
|
|
|
48
46
|
style={{ maxHeight: isOpen ? height : 0 }}
|
|
49
47
|
onTransitionEnd={() => !isOpen && setIsVisible(false)}
|
|
50
48
|
>
|
|
51
|
-
<div ref={ref}
|
|
52
|
-
{(keepContentInDom || isVisible) && children}
|
|
53
|
-
</div>
|
|
49
|
+
<div ref={ref}>{(keepContentInDom || isVisible) && children}</div>
|
|
54
50
|
</div>
|
|
55
51
|
);
|
|
56
52
|
};
|