| 1 |
import CardHeader from './card-header'; |
| 2 |
import CardBody from './card-body'; |
| 3 |
import CardImage from './card-image'; |
| 4 |
import CardOverlay from './card-overlay'; |
| 5 |
import CardFooter from './card-footer'; |
| 6 |
import CardHeadline from './card-headline'; |
| 7 |
import CardDivider from './card-divider'; |
| 8 |
|
| 9 |
import './card.scss'; |
| 10 |
|
| 11 |
const Card = React.forwardRef( ( props, ref ) => { |
| 12 |
return ( |
| 13 |
<article className={ `eps-card ${ props.className }` } ref={ ref }> |
| 14 |
{ props.children } |
| 15 |
</article> |
| 16 |
); |
| 17 |
} ); |
| 18 |
|
| 19 |
Card.propTypes = { |
| 20 |
type: PropTypes.string, |
| 21 |
className: PropTypes.string, |
| 22 |
children: PropTypes.any, |
| 23 |
}; |
| 24 |
|
| 25 |
Card.defaultProps = { |
| 26 |
className: '', |
| 27 |
}; |
| 28 |
|
| 29 |
Card.displayName = 'Card'; |
| 30 |
|
| 31 |
Card.Header = CardHeader; |
| 32 |
Card.Body = CardBody; |
| 33 |
Card.Image = CardImage; |
| 34 |
Card.Overlay = CardOverlay; |
| 35 |
Card.Footer = CardFooter; |
| 36 |
Card.Headline = CardHeadline; |
| 37 |
Card.Divider = CardDivider; |
| 38 |
|
| 39 |
export default Card; |
| 40 |
|