Created
April 29, 2019 09:37
-
-
Save hskang9/af89c24f7c468415d485c614107bfa82 to your computer and use it in GitHub Desktop.
Hover component
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 Hover extends React.Component<Props> { | |
// Set default properties | |
static defaultProps = { | |
text: "Hello World!", | |
color: "black", | |
} | |
// Items shown in property panel | |
static propertyControls: PropertyControls = { | |
text: { type: ControlType.String, title: "Text" }, | |
color: { type: ControlType.Color, title: "Background Color" }, | |
} | |
render() { | |
return <HoverContainer color={this.props.color}> | |
<p>{this.props.text}</p> | |
</HoverContainer>; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment