I am using csstype in a react component library. I want to add a hover effect, which is supported through simple pseudos. Unfortunately I cannot find any example of this being used and I can't get it to work.
I have included some code below that expressed the idea of what I want to do, but I have no idea really
import CSS from "csstype";
export const DropdownContainer: CSS.Properties = {
display: "grid",
gridTemplateColumns: "3fr 15fr 30fr",
};
export const DropdownText: CSS.Properties = {
placeSelf: 'start',
}
export const DropdownTextHov: { [P in CSS.SimplePseudos]?: CSS.Properties } = {
':hover': {
color: 'blue',
},
}
<snipped code>
return (
<div style={DropdownContainer}>
<p style={DropdownText}></p>
<p style={{DropdownText} + {DropdownTextHov}}>this is text</p>
</div>
);
I have tried a number of alternatives. I have added the hover to DropdownText, but that doesn't work.