docs: Move blobity to mounted hook
This commit is contained in:
@@ -8,6 +8,7 @@ const dark = useDark({
|
|||||||
selector: 'html',
|
selector: 'html',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
const blobity = new Blobity({
|
const blobity = new Blobity({
|
||||||
color: dark.value ? '#ffffff' : '#000000',
|
color: dark.value ? '#ffffff' : '#000000',
|
||||||
invert: true,
|
invert: true,
|
||||||
@@ -20,6 +21,7 @@ const blobity = new Blobity({
|
|||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
blobity.destroy()
|
blobity.destroy()
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
const breakpoints = useBreakpoints(breakpointsTailwind)
|
const breakpoints = useBreakpoints(breakpointsTailwind)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user