UNPKG

@jengaui/tooltip

Version:

Jenga UI Tooltip component in React

9 lines (6 loc) 460 B
import { a as a$2 } from './chunk-FUDNG6DO.js'; import { a as a$1 } from './chunk-OEI5JMST.js'; import { useState, useEffect } from 'react'; import { jsxs, jsx, Fragment } from 'react/jsx-runtime'; function a(l){let[p,s]=useState(!1),{title:n,children:o,tooltipStyles:d,width:e,...T}=l;return useEffect(()=>{s(!0);},[]),p?jsxs(a$1,{...T,children:[o,jsx(a$2,{styles:d,...e?{width:e}:null,children:n})]}):jsx(Fragment,{children:o})}var S=a; export { S as a };