@hashrytech/quick-components-kit 0.12.9 → 0.12.10

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.12.10
4
+
5
+ ### Patch Changes
6
+
7
+ - patch: allow prelaod data disable
8
+
3
9
  ## 0.12.9
4
10
 
5
11
  ### Patch Changes
@@ -3,10 +3,11 @@
3
3
  import type { ClassNameValue } from 'tailwind-merge';
4
4
 
5
5
  export type ButtonProps = {
6
+ preload?: boolean;
6
7
  href: string;
7
- children?: Snippet;
8
- icon?: Snippet;
9
- class?: ClassNameValue;
8
+ children?: Snippet;
9
+ icon?: Snippet;
10
+ class?: ClassNameValue;
10
11
  };
11
12
 
12
13
  </script>
@@ -14,11 +15,11 @@
14
15
  <script lang="ts">
15
16
  import {twMerge} from 'tailwind-merge';
16
17
 
17
- let {href, children, icon, ...props}: ButtonProps = $props();
18
+ let {href, preload=true, children, icon, ...props}: ButtonProps = $props();
18
19
 
19
20
  </script>
20
21
 
21
- <a {href} class={twMerge("flex flex-row items-center gap-2 px-4 py-2 bg-button-primary hover:bg-button-primary-hover rounded-primary w-fit cursor-pointer text-white focus:outline-focus-primary", props.class)}>
22
+ <a {href} data-sveltekit-preload-data={preload ? 'hover' : false} class={twMerge("flex flex-row items-center gap-2 px-4 py-2 bg-button-primary hover:bg-button-primary-hover rounded-primary w-fit cursor-pointer text-white focus:outline-focus-primary", props.class)}>
22
23
  {#if icon}<span class="w-10">{@render icon()}</span>{/if}
23
24
  {@render children?.()}
24
25
  </a>
@@ -1,6 +1,7 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  import type { ClassNameValue } from 'tailwind-merge';
3
3
  export type ButtonProps = {
4
+ preload?: boolean;
4
5
  href: string;
5
6
  children?: Snippet;
6
7
  icon?: Snippet;
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.12.9",
8
+ "version": "0.12.10",
9
9
  "license": "MIT",
10
10
  "author": "Hashry Tech",
11
11
  "files": [