leva icon indicating copy to clipboard operation
leva copied to clipboard

"hint" is not working

Open Igor-Vuk opened this issue 2 years ago • 2 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" }, }) }

Igor-Vuk avatar Jan 13 '24 17:01 Igor-Vuk

Seeing problems with rendering hint as well...

Uncaught Error: Tooltip must be used within TooltipProvider

sashankaryal avatar Feb 08 '24 16:02 sashankaryal

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 😄

RodrigoHamuy avatar Jul 04 '24 15:07 RodrigoHamuy