Using the css-in-js method to add classes to a react component, how do I add multiple components?
Here is the classes variable:
const styles = theme
You could use clsx. I noticed it used in the MUI buttons examples
First install it:
npm install --save clsx
Then import it in your component file:
import clsx from 'clsx';
Then use the imported function in your component:
0 讨论(0) 查看其它11个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复