@tuspe/components 1.8.2 → 1.8.4
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/README.md +1 -1
- package/dist/Button.svelte +7 -5
- package/dist/Button.svelte.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Easily replace most buttons in your project with this versatile button component
|
|
|
59
59
|
hoverText?: 'black' | 'primary' | 'secondary' | 'white'
|
|
60
60
|
href?: string | undefined
|
|
61
61
|
id?: string
|
|
62
|
-
|
|
62
|
+
noCenter?: boolean
|
|
63
63
|
noHeight?: boolean
|
|
64
64
|
noPadding?: boolean
|
|
65
65
|
onclick?: any
|
package/dist/Button.svelte
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
hoverText?: 'black' | 'primary' | 'secondary' | 'white'
|
|
23
23
|
href?: string | undefined
|
|
24
24
|
id?: string
|
|
25
|
-
|
|
25
|
+
noCenter?: boolean
|
|
26
26
|
noHeight?: boolean
|
|
27
27
|
noPadding?: boolean
|
|
28
28
|
onclick?: any
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
hoverText = 'white',
|
|
58
58
|
href,
|
|
59
59
|
id,
|
|
60
|
-
|
|
60
|
+
noCenter = false,
|
|
61
61
|
noHeight,
|
|
62
62
|
noPadding,
|
|
63
63
|
onclick = undefined,
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
value
|
|
73
73
|
}: Props = $props()
|
|
74
74
|
|
|
75
|
-
let classes = $state(
|
|
75
|
+
let classes = $state(`btn text-${color}`)
|
|
76
76
|
|
|
77
77
|
if (control) {
|
|
78
78
|
classes += ' control'
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
if (hoverText) {
|
|
101
101
|
classes += ' hover-text-' + hoverText
|
|
102
102
|
}
|
|
103
|
-
if (
|
|
104
|
-
classes += '
|
|
103
|
+
if (!noCenter) {
|
|
104
|
+
classes += ' center'
|
|
105
105
|
}
|
|
106
106
|
if (noHeight) {
|
|
107
107
|
classes += ' no-height'
|
|
@@ -188,6 +188,8 @@
|
|
|
188
188
|
.btn {
|
|
189
189
|
align-items: center;
|
|
190
190
|
display: inline-flex;
|
|
191
|
+
}
|
|
192
|
+
.btn.center {
|
|
191
193
|
justify-content: center;
|
|
192
194
|
}
|
|
193
195
|
.btn:not(.border-solid) {
|
package/dist/Button.svelte.d.ts
CHANGED