Skip to content

Instantly share code, notes, and snippets.

@oliviertassinari
Created December 29, 2018 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oliviertassinari/a3586728241b5f89cbede8348316c8e8 to your computer and use it in GitHub Desktop.
Save oliviertassinari/a3586728241b5f89cbede8348316c8e8 to your computer and use it in GitHub Desktop.
Box
import { palette, spacing, typography } from '@material-ui/system';
import styled from 'styled-components';
const Box = styled.div`${palette}${spacing}${typography}`;
// or import { unstable_Box as Box } from '@material-ui/core/Box';
<Box
color="primary.main"
bgcolor="background.paper"
fontFamily="h6.fontFamily"
fontSize={{ xs: 'h6.fontSize', sm: 'h4.fontSize', md: 'h3.fontSize' } }
p={{ xs: 2, sm: 3, md: 4} }
>
@material-ui/system
</Box>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment