@tap-payments/os-micro-frontend-shared 0.1.424 → 0.1.425
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.
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { ReactElement } from 'react';
|
|
2
2
|
import type { TooltipProps } from '@mui/material/Tooltip';
|
|
3
|
+
import { BoxProps } from '@mui/material/Box';
|
|
3
4
|
interface Props extends Omit<TooltipProps, 'children'> {
|
|
4
5
|
title: React.ReactNode;
|
|
5
6
|
placement?: TooltipProps['placement'];
|
|
6
7
|
children?: ReactElement;
|
|
7
8
|
className?: string;
|
|
9
|
+
wrapperProps?: BoxProps;
|
|
8
10
|
}
|
|
9
|
-
declare function Tooltip({ className, title, placement, children, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function Tooltip({ className, title, placement, children, wrapperProps, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export default Tooltip;
|
|
@@ -14,8 +14,8 @@ import { useId } from 'react';
|
|
|
14
14
|
import Box from '@mui/material/Box';
|
|
15
15
|
import { StyledTooltip } from './styles';
|
|
16
16
|
function Tooltip(_a) {
|
|
17
|
-
var { className, title, placement = 'top', children } = _a, rest = __rest(_a, ["className", "title", "placement", "children"]);
|
|
17
|
+
var { className, title, placement = 'top', children, wrapperProps } = _a, rest = __rest(_a, ["className", "title", "placement", "children", "wrapperProps"]);
|
|
18
18
|
const id = useId();
|
|
19
|
-
return (_jsx(StyledTooltip, Object.assign({ classes: { popper: className }, title: title, placement: placement, arrow: true }, rest, { children: _jsx(Box, Object.assign({ display: "flex", alignItems: "center" }, { children: children }), `tooltip-child-${id}`) })));
|
|
19
|
+
return (_jsx(StyledTooltip, Object.assign({ classes: { popper: className }, title: title, placement: placement, arrow: true }, rest, { children: _jsx(Box, Object.assign({ display: "flex", alignItems: "center" }, wrapperProps, { children: children }), `tooltip-child-${id}`) })));
|
|
20
20
|
}
|
|
21
21
|
export default Tooltip;
|
package/package.json
CHANGED