# All files / components/Alert/styles AlertBorder.js

20% Statements 2/10
0% Branches 0/6
0% Functions 0/2
20% Lines 2/10

    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

    4x

    4x

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

    const AlertBorder = styled.div`
      padding: ${get('spacing.small')} ${get('spacing.medium')};
      font-weight: 500;
      border-width: ${get('thicknesses.normal')};
      border-style: solid;
      width: auto;
      font-size: 1em;
      line-height: 1em;
      position: relative;
      display: flex;
      flex-direction: row;

      background: ${({ theme, type }) => {
        switch (type) {
          case 'success':
            return get('colors.positive.light');
          case 'error':
            return get('colors.negative.light');
          default:
            return get('colors.primary.light');
        }
      }};
      color: ${({ theme, type }) => {
        switch (type) {
          case 'success':
            return get('colors.positive.default');
          case 'error':
            return get('colors.negative.default');
          default:
            return get('colors.primary.default');
        }
      }};
    `;

    AlertBorder.Small = AlertBorder.extend`
      padding: 0.5em 1em;
      font-size: 0.8em;
    `;

    export default AlertBorder;