fix(popup): correct incorrect transform on switches

This commit is contained in:
sethburkart123
2024-09-06 07:00:48 +10:00
parent 220d15ebbc
commit 7f93aef9cc
6 changed files with 56 additions and 25 deletions
+6 -5
View File
@@ -5,22 +5,23 @@ import Settings from './pages/settings.svelte';
import styles from './index.css?inline';
import { mount } from 'svelte';
export default function initSvelteInterface(shadow: ShadowRoot) {
console.log(shadow)
export default function initSvelteInterface(mountPoint: ShadowRoot | HTMLElement) {
/* routes.set({
'settings': Settings,
'*': Settings
}) */
const app = mount(Settings, {
target: shadow,
target: mountPoint,
props: {
standalone: false
}
});
const style2 = document.createElement("style");
style2.setAttribute("type", "text/css");
style2.innerHTML = styles;
shadow.appendChild(style2);
mountPoint.appendChild(style2);
return app;
}