Created
May 30, 2017 19:59
-
-
Save anomaly44/213b3a1fdc8c099fc8b37c28c066c586 to your computer and use it in GitHub Desktop.
This file contains 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
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