我正在尝试在我的反应应用程序中使用 MUI 现成的组件,我正确导入了所有内容,毕竟当我运行应用程序时,浏览器中只显示元素,而不是它的样式。
import React, { Component } from 'react';
import Button from '../node_modules/muicss/lib/react/button';
class App extends Component {
render() {
return (
<div>
<div>
<Button size="small" color="primary">button</Button>
<Button size="small" color="primary" variant="flat">button</Button>
<Button size="small" color="primary" variant="raised">button</Button>
<Button size="small" color="primary" variant="fab">+</Button>
</div>
<div>
<Button color="primary">button</Button>
<Button color="primary" variant="flat">button</Button>
<Button color="primary" variant="raised">button</Button>
<Button color="primary" variant="fab">+</Button>
</div>
<div>
<Button size="large" color="primary">button</Button>
<Button size="large" color="primary" variant="flat">button</Button>
<Button size="large" color="primary" variant="raised">button</Button>
<Button size="large" color="primary" variant="fab">+</Button>
</div>
</div>
);
}
}
export default App;