# All files / components/SearchBox SearchButton.js

0% Statements 0/18
0% Branches 0/4
0% Functions 0/6
0% Lines 0/8

    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

     import styled from 'styled-components';
    import icons from '../Icon/icons';

    const SearchButtonImpl = styled.button`
      position: relative;
      display: block;
      width: 0;
      overflow: visible;
      background: none;
      border: none;
      padding: 0;
      font-size: 1.5em;
      outline: none;

      &::before {
        position: absolute;
        top: -0.125em;
        left: -1em;
        font-family: Bandwidth;
        content: "${icons('search')}";
        width: 3em;
        height: 3em;
        line-height: 3em;
        background: ${({ theme }) => theme.colors.primary};
        color: ${({ theme }) => theme.colors.white};
        text-align: center;
        border-radius: 100%;
        transition: 0.2s all ease;
        cursor: pointer;
      }

      &:not(:disabled):hover::before {
        background: ${({ theme }) => theme.colors.primaryDark};
        box-shadow: ${({ theme }) => theme.shadows.short};
      }

      &:disabled::before {
        width: 2em;
        height: 2em;
        top: 0.25em;
        line-height: 2em;
        font-size: 1em;
        left: -2em;
        background: transparent;
        color: ${({ theme }) => theme.colors.black};
        cursor: default;
      }
    `;

    export default SearchButtonImpl;