-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tooltip dialog to the control tap
- Loading branch information
Showing
4 changed files
with
102 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<template> | ||
<div v-if="open" :class="['parent-dialog', animateClass]"> | ||
<div class="wrapper"> | ||
<div class="top-epoch"><span>epoch</span><span>12345</span></div> | ||
<div class="bottom-epoch"><span>slot</span><span>34567789</span></div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import "animate.css"; | ||
export default { | ||
props: { | ||
open: { | ||
type: Boolean, | ||
required: true, | ||
}, | ||
}, | ||
data() { | ||
return { | ||
animateClass: "", | ||
}; | ||
}, | ||
watch: { | ||
open(newVal) { | ||
if (newVal) { | ||
this.animateClass = "animate__animated animate__flipInX"; | ||
setTimeout(() => { | ||
this.animateClass = ""; | ||
}, 500); // Adjust this delay to match your animation-duration | ||
} | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.parent-dialog { | ||
border-radius: 10px; | ||
z-index: 100; | ||
position: fixed; | ||
top: 10%; | ||
left: 40%; | ||
height: 25%; | ||
width: 30%; | ||
border: 3px solid #929292; | ||
background: #000; | ||
color: #eee; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
animation-duration: 0.5s; | ||
} | ||
.wrapper { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.top-epoch, | ||
.bottom-epoch { | ||
width: 100%; | ||
height: 50%; | ||
display: flex; | ||
justify-content: space-around; | ||
align-items: center; | ||
font-size: 150%; | ||
color: #eee; | ||
font-weight: 600; | ||
text-transform: uppercase; | ||
} | ||
.top-epoch > span:nth-child(2) { | ||
color: #568d50; /* Change this to the desired font color */ | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters