Fixed tooltip position (#831)
* fixed tooltip position * fix: Linting error * [updated] fixed tooltip issue
This commit is contained in:
parent
cd3d4b1390
commit
13e944a425
|
@ -14,7 +14,7 @@
|
||||||
<ft-tooltip
|
<ft-tooltip
|
||||||
v-if="tooltip !== ''"
|
v-if="tooltip !== ''"
|
||||||
class="selectTooltip"
|
class="selectTooltip"
|
||||||
position="right"
|
position="bottom"
|
||||||
:tooltip="tooltip"
|
:tooltip="tooltip"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<ft-tooltip
|
<ft-tooltip
|
||||||
v-if="tooltip !== ''"
|
v-if="tooltip !== ''"
|
||||||
class="selectTooltip"
|
class="selectTooltip"
|
||||||
|
position="bottom-left"
|
||||||
:tooltip="tooltip"
|
:tooltip="tooltip"
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
.button:focus + .text.bottom,
|
.button:focus + .text.bottom,
|
||||||
.button:hover + .text.bottom,
|
.button:hover + .text.bottom,
|
||||||
|
.button:hover + .text.bottom-left,
|
||||||
|
.button:hover + .text.bottom-left,
|
||||||
.button:focus + .text.top,
|
.button:focus + .text.top,
|
||||||
.button:hover + .text.top {
|
.button:hover + .text.top {
|
||||||
-webkit-transform: translate(-50%, 0);
|
-webkit-transform: translate(-50%, 0);
|
||||||
|
@ -57,6 +59,14 @@
|
||||||
transform: translate(-50%, -1em);
|
transform: translate(-50%, -1em);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text.bottom-left {
|
||||||
|
margin-top: 1em;
|
||||||
|
top: 100%;
|
||||||
|
left: -100px;
|
||||||
|
-webkit-transform: translate(-50%, -1em);
|
||||||
|
transform: translate(-50%, -1em);
|
||||||
|
}
|
||||||
|
|
||||||
.text.left {
|
.text.left {
|
||||||
margin-right:1em;
|
margin-right:1em;
|
||||||
right: 100%;
|
right: 100%;
|
||||||
|
|
|
@ -7,7 +7,7 @@ export default Vue.extend({
|
||||||
position: {
|
position: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'bottom',
|
default: 'bottom',
|
||||||
validator: (value) => value === 'bottom' || value === 'left' || value === 'right' || value === 'top'
|
validator: (value) => value === 'bottom' || value === 'left' || value === 'right' || value === 'top' || value === 'bottom-left'
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
Loading…
Reference in New Issue