@hexure/ui 1.8.8 → 1.8.10
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/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Copy/Copy.d.ts +2 -2
- package/dist/cjs/types/components/Loader/Loader.d.ts +2 -1
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Copy/Copy.d.ts +2 -2
- package/dist/esm/types/components/Loader/Loader.d.ts +2 -1
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/index.d.ts +5 -3
- package/package.json +3 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
2
|
import { AccessibleProps } from '../../utils/Accessibility';
|
|
3
3
|
export interface CopyProps extends AccessibleProps {
|
|
4
4
|
/** Set the text to be displayed */
|
|
5
|
-
children: string;
|
|
5
|
+
children: string | React.ReactNode;
|
|
6
6
|
align?: string;
|
|
7
7
|
/** Set the margin on the element */
|
|
8
8
|
margin?: string;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
export interface TooltipProps {
|
|
3
3
|
/** It is used to give label to tag. */
|
|
4
|
-
children:
|
|
4
|
+
children: any;
|
|
5
5
|
/** It is callback function called when user wants to close the tag. */
|
|
6
6
|
position?: 'right-top' | 'right-bottom' | 'right-center' | 'left-top' | 'left-bottom' | 'left-center';
|
|
7
7
|
/** Override the default content width of 240px */
|
|
8
8
|
width?: string;
|
|
9
|
+
/** The element to display that triggers the tooltip content */
|
|
10
|
+
trigger?: any;
|
|
9
11
|
}
|
|
10
12
|
declare const Tooltip: FC<TooltipProps>;
|
|
11
13
|
export default Tooltip;
|
package/dist/esm/index.js
CHANGED
|
@@ -3118,10 +3118,10 @@ const positions = {
|
|
|
3118
3118
|
},
|
|
3119
3119
|
};
|
|
3120
3120
|
const Content$2 = styled.div(props => (Object.assign({ position: 'absolute', borderRadius: '4px', borderWidth: '1px', borderStyle: 'solid', borderColor: Colors.PRIMARY.Hex, background: '#ffffff', boxShadow: '0px 5px 30px -10px rgba(0, 0, 0, 0.5)', width: props.$width || '240px', padding: '10px 12px', zIndex: 10 }, positions[props.$position])));
|
|
3121
|
-
const Tooltip = ({ children, position = 'right-top', width = '240px' }) => {
|
|
3121
|
+
const Tooltip = ({ children, position = 'right-top', width = '240px', trigger, }) => {
|
|
3122
3122
|
const [show_content, toggleContent] = useState(false);
|
|
3123
3123
|
return (React.createElement(Wrapper$a, { onMouseEnter: toggleContent.bind(null, true), onMouseLeave: toggleContent.bind(null, false) },
|
|
3124
|
-
React.createElement(StyledIcon$2, { path: mdiInformationOutline }),
|
|
3124
|
+
trigger || React.createElement(StyledIcon$2, { path: mdiInformationOutline }),
|
|
3125
3125
|
show_content ? (React.createElement(Content$2, { "$position": position, "$width": width }, children && React.createElement(Copy, { type: 'small' }, children))) : null));
|
|
3126
3126
|
};
|
|
3127
3127
|
|