# All files / components/Table/styles TableWrapShadow.js

16.67% Statements 1/6
0% Branches 0/4
0% Functions 0/1
16.67% Lines 1/6

    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

    4x

     import styled from 'styled-components';
    import get from 'extensions/themeGet';

    const shadowColor = get('colors.shadow.default');

    export default styled.div`
      background: ${get('colors.background.default')};
      border-width: ${get('thicknesses.normal')};
      border-style: solid;
      border-color: ${get('colors.border.medium')};
      border-radius: 5px 5px 0 0;
      font-size: 1em;
      width: 100%;
      overflow-x: auto;
      position: relative;

      ${props => {
        switch (props.shadow) {
          case 'left':
            return `box-shadow: inset 15px 0 10px -10px ${shadowColor(props)}};`;
          case 'right':
            return `box-shadow: inset -15px 0 10px -10px ${shadowColor(props)};`;
          case 'both':
            return `box-shadow: inset -15px 0 10px -10px ${shadowColor(props)},
              inset 15px 0 10px -10px ${shadowColor};`;
          default:
            return '';
        }
      }};
    `;