bits-ui 2.6.1 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ export type ScrollLockProps = {
2
2
  /**
3
3
  * Whether to prevent body scrolling when the content is open.
4
4
  *
5
- * @defaultValue true
5
+ * @default true
6
6
  */
7
7
  preventScroll?: boolean;
8
8
  /**
@@ -12,7 +12,7 @@ export type ScrollLockProps = {
12
12
  * greater than the transition duration to prevent content from shifting during
13
13
  * the transition.
14
14
  *
15
- * @defaultValue null
15
+ * @default null
16
16
  */
17
17
  restoreScrollDelay?: number | null;
18
18
  };
@@ -4,5 +4,7 @@
4
4
 
5
5
  let { preventScroll = true, restoreScrollDelay = null }: ScrollLockProps = $props();
6
6
 
7
- useBodyScrollLock(preventScroll, () => restoreScrollDelay);
7
+ if (preventScroll) {
8
+ useBodyScrollLock(preventScroll, () => restoreScrollDelay);
9
+ }
8
10
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bits-ui",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "license": "MIT",
5
5
  "repository": "github:huntabyte/bits-ui",
6
6
  "funding": "https://github.com/sponsors/huntabyte",