Skip to content

Instantly share code, notes, and snippets.

@jamesattard
Created February 28, 2018 17:27
Show Gist options
  • Save jamesattard/a10dbe34ab0201927b7fd3a244cdf90e to your computer and use it in GitHub Desktop.
Save jamesattard/a10dbe34ab0201927b7fd3a244cdf90e to your computer and use it in GitHub Desktop.
AppBar Material UI with Styled Components
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