# All files / src/FileSelect/LocalSource LocalSource.styles.ts

90.47% Statements 19/21
80% Branches 8/10
0% Functions 0/1
90.47% Lines 19/21

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    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
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    673x
    3x
    3x
    3x
    3x
    3x

    3x
    3x
    3x
    3x
    3x
    3x

    3x
    3x
    3x

    3x

    3x

    3x

    3x

     import styled from 'styled-components'
    import { Dropzone, DropzoneErrorBanner } from '../../Dropzone/Dropzone'
    import { colors } from '../../_styles/colors'
    import { mediaIE11Hack } from '../../_styles/media'
    import { spacing } from '../../_styles/spacing'
    import { ThumbnailList } from '../ThumbnailList/ThumbnailList'

    export const uploaderHeight = 411
    export const dropzoneHeight = 96
    export const errorBannerMarginTop = spacing.lg
    export const errorBannerMarginBottom = 3
    export const listMarginTop = spacing.sm
    export const listBorderWidth = 1

    const contentHeight = uploaderHeight + 2 * spacing.xl
    const dropzoneHeightWithIcon = 176
    const sourceWidth = 568

    export const StyledLocalSource = styled.div`
      display: flex;
      flex-grow: 1;
      flex-direction: column;
      align-items: stretch;
      height: ${contentHeight}px;
      max-height: ${contentHeight}px;
      padding: ${spacing.xl}px ${spacing.xl + spacing.lg}px ${spacing.xl}px
        ${spacing.xl}px;
      overflow-y: hidden;
    `

    export const StyledDropzoneErrorBanner = styled(DropzoneErrorBanner)`
      // Preserve element's shadows
      margin-top: ${errorBannerMarginTop}px;
      margin-bottom: ${errorBannerMarginBottom}px;
      margin-right: 2px;
    `

    export const StyledDropzoneWrapper = styled(Dropzone)`
      display: flex;
      height: auto;
      min-height: ${({ isIconVisible }) =>
        isIconVisible ? dropzoneHeightWithIcon : dropzoneHeight}px;

      > div:first-child {
        display: flex;
        height: auto;
      }

      // hide the default error banner
      > ${DropzoneErrorBanner} {
        display: none;
      }

      @media ${mediaIE11Hack} {
        width: ${sourceWidth}px;

        > div:first-child {
          height: 100%;
        }
      }
    `

    export const StyledThumbnailList = styled(ThumbnailList)`
      margin-top: ${listMarginTop}px;
      border: ${listBorderWidth}px solid ${colors.gray85};
    `