# All files / components/Cards Card.js

0% Statements 0/40
0% Branches 0/6
0% Functions 0/4
0% Lines 0/14

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31

     import React from 'react';
    import DefaultCardWrapper from './styles/CardWrapper';
    import CardHeader from './CardHeader';
    import CardSection from './CardSection';
    import CardGroup from './CardGroup';
    import PropTypes from 'prop-types';

    class Card extends React.Component {
      static propTypes = {
        /**
         * A component which controls the styles for the outline of the Card.
         */
        CardWrapper: PropTypes.func,
      };

      static defaultProps = {
        CardWrapper: DefaultCardWrapper,
      };

      render() {
        const { children, CardWrapper } = this.props;
        return <CardWrapper>{children}</CardWrapper>;
      }
    }

    Card.Section = CardSection;
    Card.Header = CardHeader;
    Card.Group = CardGroup;

    export default Card;