@eturnity/eturnity_reusable_components 1.2.33 → 1.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
>
|
7
7
|
<icon-image
|
8
8
|
v-if="isHovered && !isDisabled"
|
9
|
+
:hoverBg="hoverBg"
|
9
10
|
:src="require('../../assets/icons/delete_icon.svg')"
|
10
11
|
/>
|
11
12
|
<icon-image
|
@@ -27,9 +28,10 @@ const Wrapper = styled("div", wrapperAttrs)`
|
|
27
28
|
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
28
29
|
`
|
29
30
|
|
30
|
-
const
|
31
|
+
const IconImageAttrs = { hoverBg: String }
|
32
|
+
const IconImage = styled('img', IconImageAttrs)`
|
31
33
|
&:hover {
|
32
|
-
background-color: ${(props) => props.theme.colors.grey5};
|
34
|
+
background-color: ${(props) => props.hoverBg ? props.hoverBg : props.theme.colors.grey5};
|
33
35
|
border-radius: 4px;
|
34
36
|
}
|
35
37
|
`
|
@@ -45,6 +47,10 @@ export default {
|
|
45
47
|
required: false,
|
46
48
|
default: false,
|
47
49
|
},
|
50
|
+
hoverBg: {
|
51
|
+
required: false,
|
52
|
+
default: '',
|
53
|
+
}
|
48
54
|
},
|
49
55
|
data() {
|
50
56
|
return {
|
@@ -2,14 +2,11 @@
|
|
2
2
|
<component-wrapper>
|
3
3
|
<icon-wrapper :size="size">
|
4
4
|
<icon-img
|
5
|
-
:isActive="showInfo"
|
6
|
-
:size="size"
|
7
|
-
:borderColor="borderColor"
|
8
5
|
@click.prevent="toggleShowInfo()"
|
9
6
|
@mouseenter="openTrigger == 'onHover' ? toggleShowInfo() : ''"
|
10
7
|
@mouseleave="openTrigger == 'onHover' ? toggleShowInfo() : ''"
|
11
8
|
>
|
12
|
-
<icon :size="size" name="info" :color="iconColor" />
|
9
|
+
<icon :size="size" name="info" :color="iconColor" cursor="pointer" />
|
13
10
|
</icon-img>
|
14
11
|
<text-overlay
|
15
12
|
v-if="showInfo"
|
@@ -54,7 +51,7 @@ const TextOverlay = styled('div', textAttrs)`
|
|
54
51
|
: props.alignArrow === 'center'
|
55
52
|
? 'left: calc((-' + props.width + ' + ' + props.iconSize + ') /2 + 2px)'
|
56
53
|
: 'right: calc(' + props.iconSize + ' /2 - 17px)'};
|
57
|
-
text-align:
|
54
|
+
text-align: left;
|
58
55
|
background: ${(props) => props.theme.colors.black};
|
59
56
|
padding: 10px;
|
60
57
|
width: ${(props) => props.width};
|
@@ -87,16 +84,14 @@ const TextOverlay = styled('div', textAttrs)`
|
|
87
84
|
}
|
88
85
|
`
|
89
86
|
|
90
|
-
const iconAttrs = {
|
91
|
-
|
87
|
+
const iconAttrs = { size: String }
|
92
88
|
const IconWrapper = styled('div', iconAttrs)`
|
93
89
|
position: relative;
|
94
|
-
top: 1px;
|
95
90
|
height: ${(props) => props.size};
|
96
91
|
`
|
97
|
-
|
98
|
-
|
99
|
-
height:
|
92
|
+
|
93
|
+
const IconImg = styled.div`
|
94
|
+
line-height: 0;
|
100
95
|
`
|
101
96
|
|
102
97
|
const ComponentWrapper = styled.div`
|