-
Hello, I would like to know if it's possible to inject some jss property through a function like this : return ({
root: {
color: (props: any) => getColor(theme, props.color),
...(props: any) => getTypographyStyle(props.variant, theme),
},
});
});```
Actually I can't find anything about it and I would like to avoid the use of clsx to check all the possibilities.
Thank your for helping me ! 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
SBRKH
Jul 7, 2021
Replies: 1 comment
-
Juste had to do that : const useStyles = createUseStyles((theme: FUIThemeProps) => {
return ({
root: (props:any) => ({
color: getColor(theme, props.color),
...getTypographyStyle(props.variant, theme)
}),
});
}); Don't know why I struggle with that... 😅 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SBRKH
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Juste had to do that :
Don't know why I struggle with that... 😅