@snowball-tech/fractal
Version:
Fractal's (Snowball's design system) React component library based on RadixUI and TailwindCSS
2 lines • 1.14 kB
JavaScript
import{r as e}from"../helpers-DBEwVIlX.js";import{Typography as t}from"../Typography/Typography.js";import{Popover as n}from"../Popover/Popover.js";import r from"lodash/fp/omit.js";import i from"lodash/fp/isNil.js";import{jsx as a}from"react/jsx-runtime";const o=({align:o=`center`,children:s,content:c,disabled:l=!1,fullWidth:u=!1,onDisplayChange:d,onHide:f,onInteractOutside:p,onShow:m,show:h,side:g=`top`,toggleOnTriggerClick:_=!1,toggleOnTriggerHover:v=!0,tooltip:y={},withArrow:b=!0,wrapInButton:x=!1,...S})=>!s||!c?!1:a(n,{align:o,disabled:l,elevation:`bordered`,fullWidth:u,modal:!1,open:i(h)?void 0:h,popover:{...r([`className`],y),className:e(`px-1 py-0 rounded-xs bg-dark text-light`,y.className)},side:g,toggleOnTriggerClick:_,toggleOnTriggerHover:v,trigger:s,triggerAsButton:x,width:`fit`,withArrow:b,withCloseButton:!1,withScroll:!1,onClose:f,onInteractOutside:p,onOpen:m,onOpenChange:d,...r([`width`,`elevation`,`modal`,`open`,`popover`,`withCloseButton`],S),children:a(t,{element:`div`,variant:`caption-median`,children:c})});o.displayName=`Tooltip`;export{o as Tooltip,o as default};
//# sourceMappingURL=Tooltip.js.map