Skip to content

Commit e1ad6d0

Browse files
committed
docs(useSize): Fix useSize demo mistake in the documentation
1 parent 559a71f commit e1ad6d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/functions/useSize/stories/useSize.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ function useSize(
6565
6666
watch(observedEntry, () => {
6767
if (!observedEntry.value) return
68-
const { width, height } = observedEntry.value.contentRect
69-
width.value = width
70-
height.value = height
68+
width.value = observedEntry.value.contentRect.width
69+
height.value = observedEntry.value.contentRect.height
7170
})
71+
7272
return { elRef, width, height }
7373
}
7474
})

0 commit comments

Comments
 (0)