Last active
April 13, 2019 17:24
-
-
Save hskang9/a64c223ae742c045750e9973c23afa11 to your computer and use it in GitHub Desktop.
class
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
export class Frog extends React.Component<Props> { | |
// Return the component contents in JSX | |
// https://reactjs.org/docs/introducing-jsx.html | |
render() { | |
return <div style={style}>{this.props.text}</div>; | |
} | |
// Set default values for props if there are none | |
// https://reactjs.org/docs/react-component.html#defaultprops | |
static defaultProps: Props = { | |
text: "Hello World!" | |
}; | |
// Add Framer UI for this component (in the properties panel) | |
// https://framer.com/learn/docs/components#code | |
static propertyControls: PropertyControls<Props> = { | |
text: { type: ControlType.String, title: "Text" } | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment