@conduction/components 2.1.15 → 2.1.16
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/README.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
- **Version 2.1 (breaking changes from 2.0.x)**
|
|
6
6
|
|
|
7
|
+
- 2.1.16: Refactor ToolTip layoutClassName placement.
|
|
7
8
|
- 2.1.15: Add InputDate component based on react-datepicker.
|
|
8
9
|
- 2.1.14: Refactor checkbox to remove svg errors
|
|
9
10
|
- 2.1.13: Refactor components to remove svg errors (e.g. shape-rendering => shapeRendering)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
2
3
|
import ReactTooltip from "react-tooltip";
|
|
3
4
|
import * as styles from "./ToolTip.module.css";
|
|
4
5
|
export const ToolTip = ({ children, layoutClassName, tooltip }) => {
|
|
5
|
-
return (_jsxs("div", { className: styles.wrapper, children: [_jsx("div", { "data-tip": tooltip,
|
|
6
|
+
return (_jsxs("div", { className: clsx(styles.wrapper, layoutClassName && layoutClassName), children: [_jsx("div", { "data-tip": tooltip, children: children }), _jsx(ReactTooltip, { place: "top", type: "dark", effect: "solid", className: styles.tooltip })] }));
|
|
6
7
|
};
|
|
7
8
|
export { ReactTooltip };
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
1
2
|
import _ from "lodash";
|
|
2
3
|
import * as React from "react";
|
|
3
4
|
import ReactTooltip from "react-tooltip";
|
|
@@ -11,10 +12,8 @@ interface ToolTipProps {
|
|
|
11
12
|
|
|
12
13
|
export const ToolTip: React.FC<ToolTipProps> = ({ children, layoutClassName, tooltip }) => {
|
|
13
14
|
return (
|
|
14
|
-
<div className={styles.wrapper}>
|
|
15
|
-
<div data-tip={tooltip}
|
|
16
|
-
{children}
|
|
17
|
-
</div>
|
|
15
|
+
<div className={clsx(styles.wrapper, layoutClassName && layoutClassName)}>
|
|
16
|
+
<div data-tip={tooltip}>{children}</div>
|
|
18
17
|
|
|
19
18
|
<ReactTooltip place={"top"} type={"dark"} effect={"solid"} className={styles.tooltip} />
|
|
20
19
|
</div>
|