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';
const ColorSwatch = (props) => {
let style = {
backgroundColor: props.color,
return (
<div style={style}>
Lorem ...
ColorSwatch.PropTypes = {
color: PropTypes.string.isRequired,
text: PropTypes.string.isRequired
export default ColorSwatch;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment