1 | @import '../../styles/common/colors';
|
2 |
|
3 | .radio-component {
|
4 | cursor: pointer;
|
5 | overflow: hidden;
|
6 | position: relative;
|
7 | width: 100%;
|
8 |
|
9 | > input {
|
10 | cursor: pointer;
|
11 | height: 100%;
|
12 | left: 0;
|
13 | margin: 0;
|
14 | opacity: 0;
|
15 | padding: 0;
|
16 | position: absolute;
|
17 | width: 100%;
|
18 | top: 0;
|
19 | z-index: 2;
|
20 | }
|
21 |
|
22 | &:hover {
|
23 | border-color: $neutral-2;
|
24 |
|
25 | &:not(.radio-disabled) {
|
26 | > input + div .radio-input {
|
27 | &:before {
|
28 | content: "";
|
29 | background-color: $neutral-2;
|
30 | border-radius: 50%;
|
31 | display: block;
|
32 | height: 6px;
|
33 | left: 3px;
|
34 | position: relative;
|
35 | top: 3px;
|
36 | width: 6px;
|
37 | }
|
38 | }
|
39 | }
|
40 | }
|
41 |
|
42 | &:active {
|
43 | border-color: $neutral-1;
|
44 |
|
45 | &:not(.radio-disabled) {
|
46 | > input + div .radio-input {
|
47 | &:before {
|
48 | content: "";
|
49 | background-color: $neutral-1;
|
50 | border-radius: 50%;
|
51 | display: block;
|
52 | height: 6px;
|
53 | left: 3px;
|
54 | position: relative;
|
55 | top: 3px;
|
56 | width: 6px;
|
57 | }
|
58 | }
|
59 | }
|
60 | }
|
61 |
|
62 | &:not(.radio-disabled) {
|
63 | > input:checked + div .radio-input {
|
64 | border-color: $primary-1;
|
65 |
|
66 | &:before {
|
67 | content: "";
|
68 | background-color: $primary-1;
|
69 | border-radius: 50%;
|
70 | display: block;
|
71 | height: 6px;
|
72 | left: 3px;
|
73 | position: relative;
|
74 | top: 3px;
|
75 | width: 6px;
|
76 | }
|
77 | }
|
78 | }
|
79 |
|
80 | > div {
|
81 | align-items: center;
|
82 | display: flex;
|
83 | height: 100%;
|
84 | width: 100%;
|
85 |
|
86 | &.label-group {
|
87 | align-items: inherit;
|
88 | }
|
89 |
|
90 | .radio-input {
|
91 | background-color: $white;
|
92 | border-radius: 50%;
|
93 | border: solid 2px $neutral-3;
|
94 | height: 12px;
|
95 | flex-shrink: 0;
|
96 | width: 12px;
|
97 | }
|
98 |
|
99 | .label-wrapper {
|
100 | display: flex;
|
101 |
|
102 | .label-title {
|
103 | font-size: 15px;
|
104 | font-weight: 200;
|
105 | line-height: 18px;
|
106 | }
|
107 |
|
108 | .label-description {
|
109 | display: block;
|
110 | line-height: 22px;
|
111 | opacity: 0.85;
|
112 | margin-bottom: -4px;
|
113 | margin-top: 8px;
|
114 | }
|
115 | }
|
116 |
|
117 | label {
|
118 | color: $navy-text;
|
119 | font-size: 14px;
|
120 | margin-left: 10px;
|
121 | }
|
122 | }
|
123 |
|
124 | &.radio-error {
|
125 | > div .radio-input {
|
126 | border-color: $danger;
|
127 | }
|
128 | }
|
129 |
|
130 | &.radio-disabled {
|
131 | cursor: not-allowed;
|
132 |
|
133 | > input {
|
134 | cursor: not-allowed;
|
135 | }
|
136 |
|
137 | > div {
|
138 | label {
|
139 | color: $neutral-3;
|
140 | }
|
141 |
|
142 | .radio-input {
|
143 | background-color: $neutral-3;
|
144 | border-color: $neutral-3;
|
145 |
|
146 | &:before {
|
147 | display: none;
|
148 | }
|
149 | }
|
150 | }
|
151 | }
|
152 | }
|
153 |
|
154 | .radio-group {
|
155 | > label {
|
156 | display: block;
|
157 | margin-bottom: 16px;
|
158 | font-size: 16px;
|
159 | color: $navy-text;
|
160 | font-weight: 200;
|
161 | }
|
162 |
|
163 | .radio-component {
|
164 | margin-bottom: 16px;
|
165 |
|
166 | &:last-child {
|
167 | margin-bottom: 0;
|
168 | }
|
169 | }
|
170 | }
|