反正我可以将headstyles对象添加到headText对象吗?我很容易将headStyles对象注入headConfig
从'@ material-ui / core'导入{makeStyles}
const headStyles = {
backgroundColor:'green',
borderRadius:10,
padding:7
}
// CSS Styles
const useStyles = makeStyles( theme => ({
box: {
position: 'absolute',
width:'100vw',
display:'grid',
textAlign:'center',
alignItems:'center',
marginTop:'10vh',
color:'white'
},
avatar: {
justifySelf:'center',
width: theme.spacing(19),
height: theme.spacing(19),
margin: theme.spacing(6),
},
headText: {
position: 'relative',
color: '#aaa',
zIndex:1,
top:'10vh',
// TRYING TO ADD (headStyles) IN HERE SOMEHOW <<<<<<<<<<<<<<<---------
},
headConfig: headStyles
}))
headText: {
position: 'relative',
color: '#aaa',
zIndex:1,
top:'10vh',
...headStyles
},