# All files / components/Tabs TabContent.js

14.29% Statements 1/7
0% Branches 0/2
0% Functions 0/4
14.29% Lines 1/7

    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
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45

    5x

     import React from 'react';
    import PropTypes from 'prop-types';
    import styled, { css } from 'styled-components';

    const ContentDiv = styled.div`

      border: ${({ theme }) => theme.tabs.border};
      padding: ${({ theme }) => theme.tabs.padding};

      ${({ vertical }) => {
        if (vertical) {
          return css`
        border-radius: 0 3px 3px 0;
        width: 75%;
        display: table-cell;
        vertical-align: top;`;
        }
        return css`
        border-radius: 0 0 3px 3px;
        min-height: 53px;
        margin-right: -1px;
        clear: both;
        `;
      }}`;

    export default class TabContent extends React.Component {

      static propTypes = {
        /**
         * Elements within container
         */
        children: PropTypes.node,
        /**
         * Enable vertical tab layout
         */
        vertical: PropTypes.bool,
      };

      render() {
        return (<ContentDiv vertical={this.props.vertical}>{this.props.children}</ContentDiv>);
      }
    }