feat: theme toasts and move elements styling to their js

This commit is contained in:
Herculino Trotta
2025-11-22 03:04:00 -03:00
parent 605ece705e
commit 1eeb0b0f5e
5 changed files with 117 additions and 17 deletions

View File

@@ -1,21 +1,11 @@
import { delegate } from 'tippy.js';
import {delegate} from 'tippy.js';
import 'tippy.js/dist/tippy.css';
import 'tippy.js/themes/light-border.css';
import '../styles/_toasts.scss'
function initiateTooltips() {
const currentDataTheme = document.documentElement.getAttribute('data-theme') || '';
let theme;
if (currentDataTheme.endsWith('_dark')) {
theme = 'light-border';
} else if (currentDataTheme.endsWith('_light')) {
theme = 'dark';
}
delegate(document.body, {
target: '[data-tippy-content]',
theme: theme,
theme: "wygiwyh",
zIndex: 1089,
content(reference) {
return reference.getAttribute('data-tippy-content');