lecom-ui 4.5.8 → 4.5.9
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.
|
@@ -33,7 +33,13 @@ const NotificationCallout = ({ ...props }) => {
|
|
|
33
33
|
refCollapse.current?.style.setProperty("transform", "rotate(0deg)");
|
|
34
34
|
}
|
|
35
35
|
}, [isCollapsed]);
|
|
36
|
-
const handleCollapse = () =>
|
|
36
|
+
const handleCollapse = () => {
|
|
37
|
+
if (props.onCollapseChange) {
|
|
38
|
+
props.onCollapseChange(!isCollapsed);
|
|
39
|
+
} else {
|
|
40
|
+
setIsCollapsed(!isCollapsed);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
37
43
|
const defaultVariant = props.variant ?? "information";
|
|
38
44
|
const getGridColumns = () => {
|
|
39
45
|
if (props.fullWidth) {
|
package/dist/index.d.ts
CHANGED
|
@@ -606,6 +606,7 @@ interface CalloutNotificationProps extends BaseNotificationProps {
|
|
|
606
606
|
isCollapsed?: boolean;
|
|
607
607
|
action?: React$1.ReactNode;
|
|
608
608
|
defaultCollapsed?: boolean;
|
|
609
|
+
onCollapseChange?: (collapse: boolean) => void;
|
|
609
610
|
}
|
|
610
611
|
interface InlineNotificationProps extends BaseNotificationProps {
|
|
611
612
|
type: 'inline';
|
|
@@ -702,7 +703,7 @@ declare const TooltipTrigger: React$1.ForwardRefExoticComponent<TooltipPrimitive
|
|
|
702
703
|
declare const TooltipArrow: React$1.ForwardRefExoticComponent<TooltipPrimitive.TooltipArrowProps & React$1.RefAttributes<SVGSVGElement>>;
|
|
703
704
|
declare const TooltipPortal: React$1.FC<TooltipPrimitive.TooltipPortalProps>;
|
|
704
705
|
declare const tooltipContentVariants: (props?: ({
|
|
705
|
-
color?: "
|
|
706
|
+
color?: "white" | "black" | null | undefined;
|
|
706
707
|
arrow?: boolean | null | undefined;
|
|
707
708
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
708
709
|
interface TooltipContentProps extends React$1.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, VariantProps<typeof tooltipContentVariants> {
|