react-toolbox-legacy
Version:
Unofficial fork of the react-toolbox package, compatible with React v16
23 lines (19 loc) • 611 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
import { themr } from 'react-css-themr-legacy';
import classnames from 'classnames';
import { CARD } from '../identifiers.js';
const CardText = ({ children, className, theme, ...other }) => (
<div className={classnames(theme.cardText, className)} {...other}>
{typeof children === 'string' ? <p>{children}</p> : children}
</div>
);
CardText.propTypes = {
children: PropTypes.any,
className: PropTypes.string,
theme: PropTypes.shape({
cardText: PropTypes.string
})
};
export default themr(CARD)(CardText);
export { CardText };