Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import React from 'react';
import PropTypes from 'prop-types';
class ColorSwatchClass extends React.Component {
constructor(props) {
super(props);
}
render = () => {
return (
<div style={style}>
<h2>{props.text}</h2>
</div>
);
}
}
ColorSwatchClass.PropTypes = {
color: PropTypes.string.isRequired,
text: PropTypes.string.isRequired
};
export default ColorSwatchClass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment