I'm using Material-UI makeStyles function with TypeScript
I found the solution here on how to do that and it is working:
export interface StyleProps {
md?: any;
}
const useStyles = makeStyles<Theme, StyleProps>({
button: {
width: ({ md }) => md && '50%',
}
});
export default useStyles;
But I'm trying to understand how things work.
I don't understand the <Theme, StyleProps> part. I looked at all solutions on StackOverflow regarding this, no one explained it.
Could someone please clarify it?
Thanks.