wally-ui 1.0.9 → 1.0.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/package.json
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
|
-
<button class="
|
|
1
|
+
<button [type]="buttonType()" [disabled]="buttonDisabled() || buttonLoading()" class="
|
|
2
|
+
group
|
|
2
3
|
w-full
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
flex items-center justify-center
|
|
5
|
+
bg-[#0a0a0a] hover:bg-[#0a0a0a]/85
|
|
6
|
+
disabled:bg-[#0a0a0a]/85
|
|
7
|
+
dark:bg-white dark:hover:bg-white/85
|
|
8
|
+
dark:disabled:bg-white/85
|
|
9
|
+
disabled:pointer-events-none
|
|
5
10
|
p-2.5
|
|
6
11
|
rounded-md
|
|
12
|
+
transition delay-150 duration-300 ease-in-out
|
|
13
|
+
antialiased
|
|
14
|
+
cursor-pointer
|
|
7
15
|
">
|
|
16
|
+
|
|
17
|
+
@if (buttonLoading()) {
|
|
18
|
+
<svg class="mr-3 -ml-1 size-4 animate-spin dark:text-[#0a0a0a]" xmlns="http://www.w3.org/2000/svg" fill="none"
|
|
19
|
+
viewBox="0 0 24 24">
|
|
20
|
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
21
|
+
<path class="opacity-75" fill="currentColor"
|
|
22
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">
|
|
23
|
+
</path>
|
|
24
|
+
</svg>
|
|
25
|
+
}
|
|
26
|
+
|
|
8
27
|
<span class="
|
|
9
28
|
text-white
|
|
29
|
+
text-sm
|
|
30
|
+
font-medium
|
|
10
31
|
dark:text-[#0a0a0a]
|
|
11
32
|
">
|
|
12
33
|
{{ buttonText() }}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { Component, input, InputSignal } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
2
3
|
|
|
3
4
|
@Component({
|
|
4
5
|
selector: 'wally-button',
|
|
5
|
-
imports: [
|
|
6
|
+
imports: [
|
|
7
|
+
CommonModule
|
|
8
|
+
],
|
|
9
|
+
// standalone: true, (If your application is lower than Angular 19, uncomment this line)
|
|
6
10
|
templateUrl: './button.html',
|
|
7
11
|
})
|
|
8
12
|
export class Button {
|
|
9
13
|
buttonText: InputSignal<string> = input<string>('Add your button text here');
|
|
14
|
+
buttonType: InputSignal<string> = input<string>('button');
|
|
15
|
+
buttonDisabled: InputSignal<boolean> = input<boolean>(false);
|
|
16
|
+
buttonLoading: InputSignal<boolean> = input<boolean>(false);
|
|
10
17
|
}
|