# All files / src/Dropdown Dropdown.styles.tsx

93.33% Statements 14/15
76.92% Branches 10/13
100% Functions 2/2
92.3% Lines 12/13

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
    3416x
    16x
    16x

    16x
    16x

    16x

    16x

    16x

    80x
    80x

    80x
    80x

     import styled, { css } from 'styled-components'
    import { Button } from '../Button/Button'
    import { getBGColor } from '../Button/Button.styles'
    import { ButtonVariant } from '../Button/Button.types'
    import { Card } from '../Card/Card'
    import { Spinner } from '../Spinner/Spinner'

    export const StyledDropdownMenu = styled(Card)`
      display: flex;
      max-height: 40vh;
      max-width: 248px;
      min-width: inherit;
    `

    export const StyledDropdownSpinner = styled(Spinner)`
      margin: 0 6px; // TODO one-off
    `

    export const StyledDropdownButton = styled(Button)<{
      $loading: boolean
      variant: ButtonVariant
    }>`
      pointer-events: ${({ disabled, $loading }) =>
        disabled || $loading ? 'none' : 'inherit'};

      ${({ $loading, variant }) => {
        Iif ($loading) {
          return css`
            background: ${getBGColor(variant).hover};
          `
        }
      }}
    `