pmndrs / leva

🌋 React-first components GUI
https://leva.pmnd.rs
MIT License
4.86k stars 197 forks source link

"hint" is not working #486

Open Igor-Vuk opened 7 months ago

Igor-Vuk commented 7 months ago

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" }, }) }

sashankaryal commented 6 months ago

Seeing problems with rendering hint as well...

Uncaught Error: Tooltip must be used within TooltipProvider
RodrigoHamuy commented 1 month ago

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 😄