How to add multiple classes to a ReactJS Component?

后端 未结 29 2259
执念已碎
执念已碎 2020-11-27 09:16

I am new to ReactJS and JSX and I am having a little problem with the code below.

I am trying to add multiple classes to the className attribute on eac

29条回答
  •  悲&欢浪女
    2020-11-27 09:49

    I am using React 16.6.3 and @Material UI 3.5.1, and is able to use arrays in className like className={[classes.tableCell, classes.capitalize]}

    So in your example, the following would be similar.

提交回复
热议问题