'How to enabling Tool tips or my react library?

My Project: A React JS library (Not Typescript) created with create-react-library. The library works as expected.

My Question: How do I get the tooltips/hints in the editor where my packages is used?

Currently: If I import one of my components e.g

<Notice color='red' text='Warning'/>

When I hover over over Notice the tooltip shows

(alias) function Notice(_ref: any): any
import Notice

What I am looking for is a tooltip to show info along the lines of Notice (color, text)...

A few ideas I had was some kinda JS docs? or possibly I need typescript and it isn't possible with JS (but this doesn't seem right)?

While I'm usually an expert googler, I don't know enough about the issue and all I can seem to arrive at are 'JS tooltip turorials'. Any direction at all is appreciated. :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source