▲ Building a Twitter Sidebar Clone with Material-UI and React at blog.openreplay.com▼1 up and 0 down, posted by deleteman 1174 days ago 1 comment
tracker1 1174 days ago. link 1 point ▲ ▼Do *NOT* use a css file for this... use makeStyles and put it in/with your component. const useStyles = makeStyles((theme) => ({ moreLinks: { width: '100%', borderRadius: 30, fontWeight: '700', justifyContent: 'unset', fontSize: 20, marginRight: 20, textTransform: 'inherit', color: 'black', height: 60, paddingLeft: 10, paddingRight: 30, marginBottom: 5, '& .MuiSvgIcon-root': { marginRight: 10, }, '&:hover': { // ... } // ... } })); // inside component const classes = useStyles // ... passdown className to child render <SidebarLink className={classes.moreLinks} text="More" Icon={MoreHorizIcon} />