add hint.less

This commit is contained in:
Harvey committed 2022-04-28 12:45:45 +08:00
1 parent c2ea7d0ce0
commit 9cb8c56e4d
6 files changed
+681 -19

No files matched your search

+3 -2
View File
@@ -59,10 +59,11 @@ export function inverseClass(target, className) {
addClass(target, className);
}
export function tooltip(target, msg, pos = 'up') {
export function tooltip(target, msg, pos = 'top') {
if (isMobile) return;
target.setAttribute('aria-label', msg);
target.setAttribute('data-balloon-pos', pos);
addClass(target, 'hint--rounded');
addClass(target, `hint--${pos}`);
}
export function isInViewport(el, offset = 0) {