我是新手,想要一些样式控件的例子,例如使用Typescript和ReactJs的按钮
任何帮助表示赞赏
答案 0 :(得分:1)
你有很多选择。这里有一些:
加载css文件,例如
.red {
color : red;
}
然后使用className
道具:https://reactjs.org/docs/dom-elements.html#classname例如
<div className="red">I am red </div>
使用style属性:
<div style={{color: 'red'}}>I am red </div>
有很多选择。我专门为优秀的打字稿支持写了typestyle:https://typestyle.github.io/