react-toolbox/components/card/CardText.js

22 lines
583 B
JavaScript
Raw Normal View History

import React, { PropTypes } from 'react';
import { themr } from 'react-css-themr';
import classnames from 'classnames';
2017-01-26 20:05:32 +03:00
import { CARD } from '../identifiers';
const CardText = ({ children, className, theme, ...other }) => (
<div className={classnames(theme.cardText, className)} {...other}>
{typeof children === 'string' ? <p>{children}</p> : children}
</div>
);
CardText.propTypes = {
2017-01-26 20:05:32 +03:00
children: PropTypes.node,
className: PropTypes.string,
theme: PropTypes.shape({
2017-01-26 20:05:32 +03:00
cardText: PropTypes.string,
}),
};
2016-05-28 20:15:12 +03:00
export default themr(CARD)(CardText);
export { CardText };