Skip to content

Instantly share code, notes, and snippets.

@davo
Last active September 15, 2018 16:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davo/d2235074b666bfc0844417ed1d9036b9 to your computer and use it in GitHub Desktop.
Save davo/d2235074b666bfc0844417ed1d9036b9 to your computer and use it in GitHub Desktop.
CSS Grid for Framer X
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