Last active
January 7, 2021 06:49
-
-
Save mohsentaleb/476ceebf0f6ddb4fd7178bb61c29418a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MuiAvatar } from "@material-ui/core" | |
import { withStyles } from '@material-ui/core/styles' | |
const Avatar = withStyles( | |
theme => ({ | |
colorDefault: { | |
// overriding `colorDefault` according to the Avatar API | |
backgroundColor: theme.palette.secondary | |
} | |
}))(MuiAvatar) // Passing the original Avatar component to this HOC | |
function myComponent() { | |
return <Avatar /> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment