Skip to content

Instantly share code, notes, and snippets.

@daniellealexis
Last active January 16, 2018 00:40
Show Gist options
  • Select an option

  • Save daniellealexis/77d29e846ee4b6c6f0c466e626247344 to your computer and use it in GitHub Desktop.

Select an option

Save daniellealexis/77d29e846ee4b6c6f0c466e626247344 to your computer and use it in GitHub Desktop.
Creating a custom wrapper around an imported component
import React from 'react';
import PropTypes from 'prop-types';
import RaisedButton from 'material-ui/RaisedButton';
import { BUTTON_COLOR } from 'colors';
const ProductButton = (props) => (
<RaisedButton
{...props}
/>
);
ProductButton.propTypes = {
backgroundColor: PropTypes.string,
};
ProductButton.defaultProps = {
backgroundColor: BUTTON_COLOR,
};
export const ProductButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment