I have an interface on my styled component which contains the type hints for each attribute. As shown below:
interface PBProps {
color: Colours;
bgColor: Colours;
/** for example: 10px or 10% */
height: string;
paddingLR: string;
fontSize: string;
width: string;
margin: string;
fontWeight: string;
}
The idea is so when you hover over height on the actual element. I have a the comment show.
so it shows "for example: 10px or 10%" in the same box that has (JSX attribute) height: string
I understand you can do:
/**
* @param {string} height // comment
*/
but this does not give the effect i wish to achieve. Is this even possible. 2 days searching has gone far enough! my google FU is not strong enough!