Compare commits
2 Commits
94f6e850cf
...
1fc0391113
| Author | SHA1 | Date | |
|---|---|---|---|
| 1fc0391113 | |||
| 62f03cf7c0 |
@@ -36,5 +36,14 @@ export default ts.config(
|
||||
svelteConfig,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'no-empty': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{ argsIgnorePattern: '^_', varsIgnorePattern: '^\\$\\$(Props|Events|Slots|Generic)$' },
|
||||
],
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<script lang="ts">
|
||||
import { createElement } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import type { SileoOptions } from 'sileo'
|
||||
import { createElement } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import type { SileoOptions } from 'sileo';
|
||||
|
||||
let props: SileoOptions = $props()
|
||||
let rootEl: HTMLElement
|
||||
let props: SileoOptions = $props();
|
||||
let rootEl: HTMLElement;
|
||||
|
||||
$effect(() => {
|
||||
const root = createRoot(rootEl)
|
||||
$effect(() => {
|
||||
const root = createRoot(rootEl);
|
||||
|
||||
import('sileo').then(({ Toaster }) => {
|
||||
const sileo = createElement(Toaster, { ...props })
|
||||
root.render(sileo)
|
||||
})
|
||||
import('sileo').then(({ Toaster }) => {
|
||||
const sileo = createElement(Toaster, { ...props });
|
||||
root.render(sileo);
|
||||
});
|
||||
|
||||
return () => root.unmount()
|
||||
})
|
||||
return () => root.unmount();
|
||||
});
|
||||
</script>
|
||||
|
||||
<div bind:this={rootEl}></div>
|
||||
<div bind:this={rootEl}></div>
|
||||
|
||||
Reference in New Issue
Block a user