slmgc/react-hint

does this have typescript definitions?

paigeflourin opened this issue · 5 comments

i'd like to use it for my project but my project uses typescript. can it work in typescript?

slmgc commented

It doesn't have typescript definitions, but I believe it should be pretty easy to use with typescript without definitions or create ones from scratch. You are welcome to contribute :3

How do I make a component as the content? sorry i am quite confused with the docs

slmgc commented

Hi, you can use onRenderContent property to render any component as a tooltip's content:

<ReactHint events onRenderContent={(target, content) =>
    <SomeCustomComponent content={content} />
} />

Feel free to ping me if this doesn't answer your question.

Could not find a declaration file for module 'react-hint'.
Try npm install @types/react-hint if it exists or add a new declaration (.d.ts) file containing declare module 'react-hint'; TS7016

slmgc commented

@whitepotato that's because no one contributed type definitions, but you a welcome to do it