# All files / behaviors/ScrollShadow ShadowOverlay.js

0% Statements 0/10
0% Branches 0/8
0% Functions 0/3
0% Lines 0/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
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42

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

    const ShadowOverlay = styled.div`
      transition: 0.05s ease box-shadow;
      position: ${props => (props.entireViewport ? 'fixed' : 'absolute')};
      z-index: ${props => (props.entireViewport ? 'auto' : '5')};
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      pointer-events: none;

      &.outer.top {
        box-shadow: 0 -15px 10px -10px transparent,
          0 15px 10px -10px ${themeGet('colors.shadow.light')};
      }
      &.outer.bottom {
        box-shadow: 0 -15px 10px -10px ${themeGet('colors.shadow.light')},
          0 15px 10px -10px transparent;
      }
      &.outer.both {
        box-shadow: 0 -15px 10px -10px ${themeGet('colors.shadow.light')},
          0 15px 10px -10px ${themeGet('colors.shadow.light')};
      }

      &.inner.top {
        box-shadow: inset 0 -15px 10px -10px transparent,
          inset 0 15px 10px -10px ${themeGet('colors.shadow.light')};
      }
      &.inner.bottom {
        box-shadow: inset 0 -15px 10px -10px ${themeGet('colors.shadow.light')},
          inset 0 15px 10px -10px transparent;
      }
      &.inner.both {
        box-shadow: inset 0 -15px 10px -10px ${themeGet('colors.shadow.light')},
          inset 0 15px 10px -10px ${themeGet('colors.shadow.light')};
      }
    `;

    export default ShadowOverlay;