pmndrs / leva

🌋 React-first components GUI

Home Page:https://leva.pmnd.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"hint" is not working

Igor-Vuk opened this issue · comments

If I add "hint" I get an error "The above error occurred in the Tooltip component:" Tried adding it to different things, always the same. I'm using the latest versions of react, react-three/fiber, three js

const EnvironmentMapControl = () => { return useControls("environmentMap", { intensity: { value: 0.6, min: 0, max: 2, step: 0.01, hint: "This is not working" }, }) }

Seeing problems with rendering hint as well...

Uncaught Error: Tooltip must be used within TooltipProvider
commented

In the meantime, you can patch this by wrapping your app with @radix-ui/react-tooltip Provider. If you have leva installed, it will already be installed so no need to do npm i @radix-ui/react-tooltip.

import { Provider } from "@radix-ui/react-tooltip";
const App => <Provider>... the rest of your app</Provider>

I really hope leva development resuscitates at some point 😄