next-helios-fe 1.8.58 → 1.8.59
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/index.js +1 -1
- package/package.json +1 -1
- package/src/components/tooltip/index.tsx +28 -27
package/package.json
CHANGED
@@ -184,42 +184,43 @@ export const Tooltip: React.FC<TooltipProps> = ({
|
|
184
184
|
onMouseLeave={() => setVisible(false)}
|
185
185
|
>
|
186
186
|
{children}
|
187
|
-
{
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
<div style={getTooltipArrowPosition()}></div>
|
198
|
-
</div>
|
199
|
-
)}
|
200
|
-
<div className="flex items-center">
|
201
|
-
{position === "right" && (
|
187
|
+
{typeof document !== "undefined" &&
|
188
|
+
createPortal(
|
189
|
+
<div
|
190
|
+
ref={tooltipRef}
|
191
|
+
className={`absolute z-50 duration-200 transition-opacity ${
|
192
|
+
visible ? "opacity-100" : "opacity-0 pointer-events-none"
|
193
|
+
} ${options?.enableHover ? "" : "pointer-events-none"}`}
|
194
|
+
style={getTooltipPosition()}
|
195
|
+
>
|
196
|
+
{position === "bottom" && (
|
202
197
|
<div className="flex justify-center">
|
203
198
|
<div style={getTooltipArrowPosition()}></div>
|
204
199
|
</div>
|
205
200
|
)}
|
206
|
-
<div className="
|
207
|
-
{
|
201
|
+
<div className="flex items-center">
|
202
|
+
{position === "right" && (
|
203
|
+
<div className="flex justify-center">
|
204
|
+
<div style={getTooltipArrowPosition()}></div>
|
205
|
+
</div>
|
206
|
+
)}
|
207
|
+
<div className="max-w-96 w-fit px-3 py-1.5 rounded-md bg-black/75 text-sm text-white">
|
208
|
+
{content}
|
209
|
+
</div>
|
210
|
+
{position === "left" && (
|
211
|
+
<div className="flex justify-center">
|
212
|
+
<div style={getTooltipArrowPosition()}></div>
|
213
|
+
</div>
|
214
|
+
)}
|
208
215
|
</div>
|
209
|
-
{position === "
|
216
|
+
{position === "top" && (
|
210
217
|
<div className="flex justify-center">
|
211
218
|
<div style={getTooltipArrowPosition()}></div>
|
212
219
|
</div>
|
213
220
|
)}
|
214
|
-
</div
|
215
|
-
|
216
|
-
|
217
|
-
<div style={getTooltipArrowPosition()}></div>
|
218
|
-
</div>
|
219
|
-
)}
|
220
|
-
</div>,
|
221
|
-
document.body
|
222
|
-
)}
|
221
|
+
</div>,
|
222
|
+
document.body
|
223
|
+
)}
|
223
224
|
</div>
|
224
225
|
);
|
225
226
|
};
|