@homecode/ui 4.27.4 → 4.27.6
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.
|
@@ -7,10 +7,10 @@ var SvgStop = function SvgStop(props) {
|
|
|
7
7
|
fill: "currentColor",
|
|
8
8
|
viewBox: "0 0 24 24"
|
|
9
9
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
10
|
-
d: "
|
|
10
|
+
d: "M5.254 5.312h13.449v13.449H5.254Z",
|
|
11
11
|
style: {
|
|
12
12
|
stroke: "currentColor",
|
|
13
|
-
strokeWidth:
|
|
13
|
+
strokeWidth: 5.50889,
|
|
14
14
|
strokeLinecap: "round",
|
|
15
15
|
strokeLinejoin: "round",
|
|
16
16
|
strokeMiterlimit: 0.6,
|
|
@@ -3,7 +3,7 @@ import { useRef, useEffect } from 'react';
|
|
|
3
3
|
import S from './Tooltip.styl.js';
|
|
4
4
|
import cn from 'classnames';
|
|
5
5
|
|
|
6
|
-
const Tooltip = ({ children, content, delay = 0, direction = 'top', blur = false, }) => {
|
|
6
|
+
const Tooltip = ({ className, contentClassName, children, content, delay = 0, direction = 'top', blur = false, }) => {
|
|
7
7
|
const triggerRef = useRef(null);
|
|
8
8
|
const tooltipRef = useRef(null);
|
|
9
9
|
const timeoutRef = useRef();
|
|
@@ -66,7 +66,7 @@ const Tooltip = ({ children, content, delay = 0, direction = 'top', blur = false
|
|
|
66
66
|
}, [content, delay, direction]);
|
|
67
67
|
if (!content)
|
|
68
68
|
return jsx(Fragment, { children: children });
|
|
69
|
-
return (jsxs(Fragment, { children: [jsx("div", { ref: triggerRef, className: S.trigger, children: children }), jsx("div", { ref: tooltipRef, popover: "manual", className: cn(S.tooltip, blur && S.blur), "data-direction": direction, children: content })] }));
|
|
69
|
+
return (jsxs(Fragment, { children: [jsx("div", { ref: triggerRef, className: cn(S.trigger, className), children: children }), jsx("div", { ref: tooltipRef, popover: "manual", className: cn(S.tooltip, blur && S.blur, contentClassName), "data-direction": direction, children: content })] }));
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export { Tooltip };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="uilib/components/tooltip/types" />
|
|
2
2
|
export interface TooltipProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
contentClassName?: string;
|
|
3
5
|
children: React.ReactNode;
|
|
4
6
|
content?: React.ReactNode;
|
|
5
7
|
delay?: number;
|
|
@@ -11,4 +13,4 @@ declare module 'react' {
|
|
|
11
13
|
popover?: string;
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
|
-
export declare const Tooltip: ({ children, content, delay, direction, blur, }: TooltipProps) => JSX.Element;
|
|
16
|
+
export declare const Tooltip: ({ className, contentClassName, children, content, delay, direction, blur, }: TooltipProps) => JSX.Element;
|