@eturnity/eturnity_reusable_components 8.7.4-EPDM-12729.20 → 8.7.4-EPDM-12729.21
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -10,6 +10,9 @@
|
|
10
10
|
<IconWrapper
|
11
11
|
:background-color="backgroundColor"
|
12
12
|
:border-radius="borderRadius"
|
13
|
+
:hovered-icon="hoveredIcon"
|
14
|
+
:is-active="isActive"
|
15
|
+
:is-disabled="isDisabled"
|
13
16
|
:padding="padding"
|
14
17
|
>
|
15
18
|
<LabelWrapper
|
@@ -150,6 +153,9 @@
|
|
150
153
|
backgroundColor: String,
|
151
154
|
borderRadius: String,
|
152
155
|
padding: String,
|
156
|
+
hoveredIcon: Boolean,
|
157
|
+
isActive: Boolean,
|
158
|
+
isDisabled: Boolean,
|
153
159
|
}
|
154
160
|
const IconWrapper = styled('div', IconWrapperAttrs)`
|
155
161
|
display: flex;
|
@@ -158,8 +164,18 @@
|
|
158
164
|
gap: 6px;
|
159
165
|
white-space: nowrap;
|
160
166
|
background-color: ${(props) => props.backgroundColor};
|
161
|
-
border-radius: ${(props) =>
|
167
|
+
border-radius: ${(props) =>
|
168
|
+
props.hoveredIcon ? '6px' : props.borderRadius};
|
162
169
|
padding: ${(props) => props.padding};
|
170
|
+
width: ${(props) => (props.hoveredIcon ? '32px' : '')};
|
171
|
+
height: ${(props) => (props.hoveredIcon ? '32px' : '')};
|
172
|
+
cursor: pointer;
|
173
|
+
background-color: ${(props) =>
|
174
|
+
props.isActive ? props.theme.colors.transparentWhite2 : ''};
|
175
|
+
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
176
|
+
&:hover {
|
177
|
+
background-color: ${(props) => props.theme.colors.transparentWhite2};
|
178
|
+
}
|
163
179
|
`
|
164
180
|
|
165
181
|
const LabelWrapperAttrs = {
|
@@ -190,6 +206,11 @@
|
|
190
206
|
default: '',
|
191
207
|
type: String,
|
192
208
|
},
|
209
|
+
isActive: {
|
210
|
+
required: false,
|
211
|
+
default: false,
|
212
|
+
type: Boolean,
|
213
|
+
},
|
193
214
|
labelText: {
|
194
215
|
required: false,
|
195
216
|
default: '',
|
@@ -281,6 +302,11 @@
|
|
281
302
|
default: false,
|
282
303
|
required: false,
|
283
304
|
},
|
305
|
+
hoveredIcon: {
|
306
|
+
type: Boolean,
|
307
|
+
default: false,
|
308
|
+
required: false,
|
309
|
+
},
|
284
310
|
},
|
285
311
|
setup(props) {
|
286
312
|
const isVisible = ref(false)
|