问题描述
目前我正在尝试自定义元素的样式,但我们可以从这里开始。我似乎无法正确使用 makeStyles
,不确定是因为有嵌套组件还是什么。无法正常工作的行是 <TableHead className={classes.top_row}>
。我试过同时使用 @material-ui/styles
和 @material-ui/core
makeStyles
函数,但无济于事。
'''
import { makeStyles} from '@material-ui/core';
const useStyles = makeStyles((theme) =>({
table: {
width: "100%",},createServiceButton:{
width: "170px",height: "50px",top_row:{
color: '#E1C699',fontWeight: 550,fontFamily:'Times New Roman'
},}));
export default function ShowServiceList() {
const classes = useStyles();
return(<TableContainer component={Paper}>
<Table aria-label="simple table">
<TableHead className={classes.top_row}>
<TableRow>
<TableCell>Subject</TableCell>
<TableCell align="right">Description</TableCell>
<TableCell align="right">Technology</TableCell>
<TableCell align="right">OS</TableCell>
<TableCell align="right">Posted By</TableCell>
</TableRow>
</TableHead>
<TableBody>
{!filterIsActive
? serviceList.map((service) => (
<Service service={service} key={service.service_id} />
))
: filterServices()}
</TableBody>
</Table>
</TableContainer>
);
}
'''
附带问题,在 React-Node 应用程序中,依赖项 rae 安装在 node 还是 React 的 package.json 中是否重要?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)