import React from 'react';
import Navigation from '../navigation';
import Ripple from '../ripple';
import style from './style';
class Card extends React.Component {
static propTypes = {
actions: React.PropTypes.array,
className: React.PropTypes.string,
color: React.PropTypes.string,
image: React.PropTypes.string,
loading: React.PropTypes.bool,
onClick: React.PropTypes.func,
text: React.PropTypes.string,
title: React.PropTypes.string,
type: React.PropTypes.oneOf(['wide', 'event', 'image'])
};
static defaultProps = {
className: '',
loading: false
};
handleMouseDown = (event) => {
if (this.props.onClick) {
event.preventDefault();
this.refs.ripple.start(event);
this.props.onClick(event, this);
}
};
renderActions () {
if (this.props.actions) {
return (
{this.props.text}
: null } { this.renderActions() }