@veritree/ui 0.35.0 → 0.36.0
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
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
v-if="show"
|
|
4
4
|
:class="[
|
|
5
5
|
// default styles
|
|
6
|
-
headless
|
|
7
|
-
? 'alert'
|
|
8
|
-
: 'flex items-start gap-3 rounded border border-solid p-3',
|
|
6
|
+
headless ? 'alert' : 'flex items-start gap-3 rounded border border-solid',
|
|
9
7
|
// variant styles
|
|
10
8
|
headless
|
|
11
9
|
? `alert--${variant}`
|
|
@@ -16,6 +14,14 @@
|
|
|
16
14
|
: isWarning
|
|
17
15
|
? 'border-warning-300 bg-warning-200 text-warning-700'
|
|
18
16
|
: null,
|
|
17
|
+
// sizes styles
|
|
18
|
+
headless
|
|
19
|
+
? `alert--${size}`
|
|
20
|
+
: isLarge
|
|
21
|
+
? 'p-3'
|
|
22
|
+
: isSmall
|
|
23
|
+
? 'py-1 px-2 text-sm'
|
|
24
|
+
: null,
|
|
19
25
|
]"
|
|
20
26
|
role="alert"
|
|
21
27
|
>
|
|
@@ -43,6 +49,10 @@ export default {
|
|
|
43
49
|
type: String,
|
|
44
50
|
default: 'success',
|
|
45
51
|
},
|
|
52
|
+
size: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: 'large',
|
|
55
|
+
},
|
|
46
56
|
headless: {
|
|
47
57
|
type: Boolean,
|
|
48
58
|
default: false,
|
|
@@ -71,6 +81,14 @@ export default {
|
|
|
71
81
|
isWarning() {
|
|
72
82
|
return this.variant === 'warning';
|
|
73
83
|
},
|
|
84
|
+
|
|
85
|
+
isLarge() {
|
|
86
|
+
return this.size === 'large';
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
isSmall() {
|
|
90
|
+
return this.size === 'small';
|
|
91
|
+
},
|
|
74
92
|
},
|
|
75
93
|
|
|
76
94
|
methods: {
|