Last active
September 15, 2018 16:28
-
-
Save davo/d2235074b666bfc0844417ed1d9036b9 to your computer and use it in GitHub Desktop.
CSS Grid for Framer X
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 * as React from 'react' | |
const container: React.CSSProperties = { | |
width: '100%', | |
height: '100%', | |
display: 'grid', | |
gridTemplateColumns: '10rem 10rem 10rem 10rem' | |
} | |
const item: React.CSSProperties = { | |
width: '100%', | |
height: '100%', | |
display: 'grid', | |
color: '#8855FF', | |
background: 'rgba(136, 85, 255, 0.1)', | |
borderColor: 'rgba(136, 85, 255, 0.6)', | |
borderWidth: 1, | |
borderStyle: 'solid' | |
} | |
export class Grid extends React.Component { | |
render() { | |
return ( | |
<div style={container}> | |
<div style={item}>Element</div> | |
<div style={item}>Element</div> | |
<div style={item}>Element</div> | |
<div style={item}>Element</div> | |
</div> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment