@webamoki/web-svelte 0.5.32 → 0.5.33

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.
@@ -5,15 +5,24 @@
5
5
 
6
6
  type Props = ButtonProps & {
7
7
  loading?: boolean;
8
+ class?: string;
9
+ loadingMessage?: string;
8
10
  };
9
11
 
10
- let { disabled, loading, children, ...restProps }: Props = $props();
12
+ let {
13
+ disabled,
14
+ loading,
15
+ children,
16
+ loadingMessage = 'Please wait',
17
+ class: className,
18
+ ...restProps
19
+ }: Props = $props();
11
20
  </script>
12
21
 
13
- <Button disabled={disabled || loading} {...restProps}>
22
+ <Button disabled={disabled || loading} class={className} {...restProps}>
14
23
  {#if loading}
15
24
  <Loader2Icon class="mr-2 animate-spin" />
16
- Please wait
25
+ {loadingMessage}
17
26
  {:else}
18
27
  {@render children?.()}
19
28
  {/if}
@@ -2,6 +2,8 @@ import { Button } from '../../shadcn/components/ui/button/index.js';
2
2
  import type { ButtonProps } from '../../shadcn/components/ui/button/index.js';
3
3
  type Props = ButtonProps & {
4
4
  loading?: boolean;
5
+ class?: string;
6
+ loadingMessage?: string;
5
7
  };
6
8
  declare const Button: import("svelte").Component<Props, {}, "">;
7
9
  type Button = ReturnType<typeof Button>;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.5.32",
6
+ "version": "0.5.33",
7
7
  "license": "MIT",
8
8
  "files": [
9
9
  "dist",