# All files / components/Anchor/styles ExternalTextAnchor.js

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4

    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

    5x

    5x

    5x

    5x

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

    const color = get('colors.primary.alternate');

    const ExternalTextAnchor = styled.a`
      color: ${color};
      font-family: ${get('fonts.brand')};

      text-decoration: none;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
      position: relative;
      height: auto;
      margin: auto;

      &:focus {
        outline: none;
      }

      &:active {
        color: ${get('colors.primary.default')};
      }

      &::after {
        content: '';
        background: ${color};
        border-radius: 2em;
        height: 1px;
        width: 100%;
        position: absolute;
        bottom: -0.1em;
        left: 0;
        transition: height 0.15s ease, width 0.15s ease, left 0.15s ease,
          opacity 0.25s ease;
      }

      &:hover::after,
      &:focus::after {
        height: calc(100% + 0.2em);
        width: calc(100% + 0.6em);
        left: -0.3em;
        opacity: 0.125;
        transition: height 0.15s ease, width 0.15s ease, left 0.15s ease,
          opacity 0s ease;
      }
    `;

    const dangerColor = get('colors.negative.default');

    ExternalTextAnchor.Danger = ExternalTextAnchor.extend`
      color: ${dangerColor};

      &:active {
        color: ${get('colors.negative.dark')};
      }

      &::after {
        background: ${dangerColor};
      }
    `;

    export default ExternalTextAnchor;