Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import * as React from 'react';
  2. import Grid from '@material-ui/core/Grid';
  3. import Hidden from '@material-ui/core/Hidden';
  4.  
  5. interface StandardLayoutProps {
  6.     children: React.ReactElement
  7. }
  8.  
  9. export const StandardLayout: React.FC<StandardLayoutProps> = ({children}) => (
  10.     <Grid container style={{marginTop: 16}}>
  11.         <Hidden mdUp>
  12.             <Grid item xs={12}>
  13.                 <div style={{
  14.                    marginLeft: '2.08333333334%',
  15.                    marginRight: '2.08333333334%',
  16.                }}>
  17.                     {children}
  18.                 </div>
  19.             </Grid>
  20.         </Hidden>
  21.         <Hidden smDown>
  22.             <Grid item lg={2}/>
  23.             <Grid item xs={10} lg={8}>
  24.                 {children}
  25.             </Grid>
  26.         </Hidden>
  27.     </Grid>
  28. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement