Skip to content

Instantly share code, notes, and snippets.

@anomaly44
Created May 30, 2017 19:59
Show Gist options
  • Save anomaly44/213b3a1fdc8c099fc8b37c28c066c586 to your computer and use it in GitHub Desktop.
Save anomaly44/213b3a1fdc8c099fc8b37c28c066c586 to your computer and use it in GitHub Desktop.
import React from 'react'
import PropTypes from 'prop-types'
import { Card, CardTitle } from 'material-ui/Card'
export const FeatureCard = ({ color, title, subtitle, icon }) => {
const styles = {
card: { borderLeft: `solid 4px ${color}`, flex: '1', marginRight: '1em' },
icon: { float: 'right', width: 64, height: 64, padding: 16, color },
};
return (<Card style={styles.card} >
<icon style={styles.icon} />
<CardTitle title={title} subtitle={subtitle} />
</Card>);
};
FeatureCard.propTypes = {
title: PropTypes.string.isRequired,
subtitle: PropTypes.string.isRequired,
color: PropTypes.string.isRequired,
icon: PropTypes.func.isRequired,
};
export default FeatureCard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment