docs: Move blobity to mounted hook
This commit is contained in:
@@ -8,17 +8,19 @@ const dark = useDark({
|
|||||||
selector: 'html',
|
selector: 'html',
|
||||||
})
|
})
|
||||||
|
|
||||||
const blobity = new Blobity({
|
onMounted(() => {
|
||||||
color: dark.value ? '#ffffff' : '#000000',
|
const blobity = new Blobity({
|
||||||
invert: true,
|
color: dark.value ? '#ffffff' : '#000000',
|
||||||
zIndex: 0,
|
invert: true,
|
||||||
magnetic: false,
|
zIndex: 0,
|
||||||
dotColor: '#10b981',
|
magnetic: false,
|
||||||
radius: 8,
|
dotColor: '#10b981',
|
||||||
})
|
radius: 8,
|
||||||
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
blobity.destroy()
|
blobity.destroy()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const breakpoints = useBreakpoints(breakpointsTailwind)
|
const breakpoints = useBreakpoints(breakpointsTailwind)
|
||||||
|
|||||||
Reference in New Issue
Block a user