[feat] folder borders
This commit is contained in:
@@ -1,11 +1,28 @@
|
||||
import tippy from 'tippy.js'
|
||||
import 'tippy.js/dist/tippy.css';
|
||||
import 'tippy.js/themes/translucent.css';
|
||||
|
||||
export function tooltip(node:HTMLElement, tip:string) {
|
||||
const instance = tippy(node, {
|
||||
content: tip,
|
||||
animation: 'fade',
|
||||
arrow: true,
|
||||
theme: 'translucent',
|
||||
})
|
||||
return {
|
||||
destroy() {
|
||||
instance.destroy()
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function tooltipRight(node:HTMLElement, tip:string) {
|
||||
const instance = tippy(node, {
|
||||
content: tip,
|
||||
animation: 'fade',
|
||||
arrow: true,
|
||||
placement: 'right',
|
||||
theme: 'translucent',
|
||||
})
|
||||
return {
|
||||
destroy() {
|
||||
|
||||
Reference in New Issue
Block a user