UNPKG

1.74 kBSCSSView Raw
1@import '../../styles/common/colors';
2
3.button-toggle-component {
4 cursor: pointer;
5 position: relative;
6 > input {
7 cursor: pointer;
8 height: 100%;
9 left: 0;
10 margin: 0;
11 opacity: 0;
12 padding: 0;
13 position: absolute;
14 width: 100%;
15 z-index: 2;
16 }
17
18 &.button-toggle-disabled {
19 cursor: not-allowed;
20 > input {
21 cursor: not-allowed;
22 }
23 }
24}
25
26.button-group {
27 .options {
28 display: flex;
29 .button-toggle-component {
30 button {
31 margin: 0;
32 }
33 &:first-child button {
34 border-right: none;
35 border-radius: 3px 0 0 3px;
36 }
37 &:last-child button {
38 border-left: none;
39 border-radius: 0 3px 3px 0;
40 }
41 &:not(.active) + .button-toggle-component:not(.active) {
42 margin-left: 1px;
43 &:before {
44 content: "";
45 position: absolute;
46 height: 100%;
47 width: 1px;
48 background-color: $neutral-3;
49 top: 0;
50 left: -1px;
51 z-index: 1;
52 }
53 }
54 + .button-toggle-component {
55 &:not(:last-child) button {
56 border-radius: 0;
57 border-right: none;
58 border-left: none;
59 }
60 }
61 &.active {
62 button {
63 padding-right: 9px;
64 padding-left: 9px;
65 }
66 &:first-child button {
67 padding-right: 9px;
68 padding-left: 8px;
69 }
70 &:last-child button {
71 padding-right: 8px;
72 padding-left: 9px;
73 }
74 }
75 }
76 }
77 > .asterisk {
78 color: $danger;
79 float: left;
80 margin-right: 5px;
81 }
82 > label {
83 display: block;
84 margin-bottom: 10px;
85 font-size: 16px;
86 color: $navy-text;
87 font-weight: 200;
88 }
89}