Created
February 28, 2018 17:27
-
-
Save jamesattard/a10dbe34ab0201927b7fd3a244cdf90e to your computer and use it in GitHub Desktop.
AppBar Material UI with Styled Components
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
const StyledTypography = styled(Typography)` | |
flex: 1; | |
`; | |
const StyledButton = styled(Button)` | |
background: linear-gradient(45deg, #fe6b8b 30%, #ff8e53 90%); | |
border-radius: 3px; | |
border: 0; | |
color: white; | |
height: 48px; | |
padding: 0 30px; | |
box-shadow: 0 3px 5px 2px rgba(255, 105, 135, 0.3); | |
`; | |
<AppBar position="static" color="primary"> | |
<Toolbar> | |
<StyledTypography variant="title" color="inherit"> | |
My App | |
</StyledTypography> | |
<StyledButton>Login</StyledButton> | |
</Toolbar> | |
</AppBar> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment