Skip to content

Instantly share code, notes, and snippets.

@davo
Forked from zachj0hnston/framerx_boilerplate.tsx
Created August 16, 2018 18:45
Show Gist options
  • Save davo/6078d9a408a0f01734e84ba5687987e0 to your computer and use it in GitHub Desktop.
Save davo/6078d9a408a0f01734e84ba5687987e0 to your computer and use it in GitHub Desktop.
import * as React from 'react'
import { Frame, PropertyControls, ControlType } from 'framer'
interface Props {
color: string
}
export class componentName extends React.Component<Props> {
static defaultProps = {
width: 1600,
height: 1200,
color: '#e0f'
}
static propertyControls = {
color: {
type: ControlType.Color,
title: 'Color'
}
}
state = {}
render() {
const { color } = this.props
return (
<Frame
style={{
height: '100%',
width: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: color
}}
/>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment