chore: replace sonner with sileo
This commit is contained in:
1 parent
d9dd21d3be
commit
abc7b9d9d9
6 files changed
+190
-32
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<script lang="ts">
|
||||
import { createElement } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import type { SileoOptions } from 'sileo'
|
||||
|
||||
let props: SileoOptions = $props()
|
||||
let rootEl: HTMLElement
|
||||
|
||||
$effect(() => {
|
||||
const root = createRoot(rootEl)
|
||||
|
||||
import('sileo').then(({ Toaster }) => {
|
||||
const sileo = createElement(Toaster, { ...props })
|
||||
root.render(sileo)
|
||||
})
|
||||
|
||||
return () => root.unmount()
|
||||
})
|
||||
</script>
|
||||
|
||||
<div bind:this={rootEl}></div>
|
||||
Reference in new issue
Block a user