All files / components/button button.styled.js

0% Statements 0/9
0% Branches 0/4
0% Functions 0/4
0% Lines 0/3
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154                                                                                                                                                                                                                                                                                                                   
import styled from 'styled-components'
 
export default styled.button`
  border: 0;
  outline: 0;
  cursor: pointer;
  position: relative;
  width: ${(props) => props.width};
  height: ${(props) => props.height};
  background-color: transparent;
  font-weight: 600;
  border-radius: 2px;
  transition: background-color 0.1s linear, border-color 0.1s linear;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
 
  .content-button {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
 
    > .icon{
      padding: 0px 4px;
      width: 24px;
      height: 24px;
      box-sizing: content-box;
    }
  }
 
  &:disabled {
    opacity: .5;
    cursor: not-allowed;
  }
 
  &:active {
   padding-top: 4px;
  }
 
  &.primary {
    color: #ffffff;
    background-color: #2870b2;
 
    &:hover {
      background-color: #6197c6;
    }
 
    &:active {
      background-color: #2870b2;
      box-shadow: inset 0 1px 3px 0 #073050;
    }
  }
 
  &.secondary {
    color: #2870b2;
    background-color: #e7f0f7;
    border: solid 1px #afcef3;
 
    &:hover {
      background-color: #e7f0f7;
      border: solid 1px #5596c8;
    }
 
    &:active {
      background-color: #e7f0f7;
      box-shadow: inset 0 1px 3px 0 rgba(16, 68, 112, 0.3);
      border: solid 1px #afcef3;
    }
  }
 
  &.default {
    color: #496072;
    background-color: #ffffff;
    border: solid 1px #c5d0e1;
 
    &:hover {
      background-color: #f4f5f8;
      border: solid 1px #c5d0e1;
    }
 
    &:active {
      background-color: #f4f5f8;
      box-shadow: inset 0 1px 3px 0 #95a3b7;
      border: solid 1px rgba(197, 208, 225, 1);
    }
  }
 
  &.danger {
    color: #ffffff;
    background-color: #ed393d;
    border-color:#a22225;
 
    &:hover {
      background-color: #fb8486;
    }
 
    &:active {
      background-color: #ec393d;
      box-shadow: inset 0 1px 3px 0 #610d12;
    }
  }
 
  .button-badge{
    border-radius: 40px;
    top: -10px;
    left: -8px;
    padding: 4px;
    min-width: 20px;
    display: flex;
    text-align: center;
    position: absolute;
    justify-content: center;
    align-items: center;
 
    &.primary{
      >.button-badge-label{
        color: #ffffff;
      }
      background-color: #2870b2;
    }
 
    &.secondary{
      >.button-badge-label{
        color: #2870b2;
      }
      background-color: #e7f0f7;
    }
 
    &.default{
      >.button-badge-label{
        color: #496072;
      }
      border: solid 1px #eaeaea;
      background-color: #ffffff;
    }
 
    &.danger{
      >.button-badge-label{
        color: #ffffff;
      }
      background-color: #ed393d;
    }
 
    >.button-badge-label{
      font-size: 10px;
      font-weight: 700;
    }
 
  }
`