@hashrytech/quick-components-kit 0.8.4 → 0.8.5

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hashrytech/quick-components-kit
2
2
 
3
+ ## 0.8.5
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: scroll disable fix for overlay component
8
+
3
9
  ## 0.8.4
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" module>
2
- import { type Snippet } from 'svelte';
2
+ import { onDestroy, onMount, type Snippet } from 'svelte';
3
3
  import type { ClassNameValue } from 'tailwind-merge';
4
4
  import { fade } from 'svelte/transition';
5
5
  import {twMerge} from 'tailwind-merge';
@@ -21,10 +21,14 @@
21
21
  const lockScroll = () => document.body.style.overflow = 'hidden';
22
22
  const unlockScroll = () => document.body.style.overflow = '';
23
23
 
24
- $effect(() => {
25
- if (disableBodyScroll) lockScroll(); else unlockScroll();
24
+ onMount(() => {
25
+ lockScroll();
26
26
  });
27
27
 
28
+ onDestroy(() => {
29
+ unlockScroll();
30
+ });
31
+
28
32
  </script>
29
33
 
30
34
  <div transition:fade={{duration: transitionDuration}} class={twMerge("fixed top-0 left-0 right-0 bottom-0 bg-overlay-primary", props.class)} role="presentation" {onclick}></div>
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hashrytech/quick-components-kit.git"
7
7
  },
8
- "version": "0.8.4",
8
+ "version": "0.8.5",
9
9
  "license": "MIT",
10
10
  "author": "Hashry Tech",
11
11
  "files": [