@redseed/redseed-ui-vue3 6.3.0 → 6.3.1
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
|
@@ -7,6 +7,11 @@ const props = defineProps({
|
|
|
7
7
|
type: Boolean,
|
|
8
8
|
default: false,
|
|
9
9
|
},
|
|
10
|
+
variant: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: 'default',
|
|
13
|
+
validator: (value) => ['default', 'info', 'success', 'warning', 'error'].includes(value)
|
|
14
|
+
}
|
|
10
15
|
})
|
|
11
16
|
|
|
12
17
|
const emit = defineEmits(['close'])
|
|
@@ -20,7 +25,10 @@ function close() {
|
|
|
20
25
|
</script>
|
|
21
26
|
<template>
|
|
22
27
|
<div v-if="!isClosed"
|
|
23
|
-
class="
|
|
28
|
+
:class="[
|
|
29
|
+
'rsui-message-box',
|
|
30
|
+
`rsui-message-box--${variant}`
|
|
31
|
+
]"
|
|
24
32
|
>
|
|
25
33
|
<div class="rsui-message-box__head">
|
|
26
34
|
<div class="rsui-message-box__title">
|
|
@@ -41,7 +49,28 @@ function close() {
|
|
|
41
49
|
</template>
|
|
42
50
|
<style lang="scss" scoped>
|
|
43
51
|
.rsui-message-box {
|
|
44
|
-
@apply border
|
|
52
|
+
@apply border rounded-lg overflow-hidden p-4;
|
|
53
|
+
|
|
54
|
+
&--default {
|
|
55
|
+
@apply bg-message-box-background-default border-message-box-border-default text-message-box-text-default;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--info {
|
|
59
|
+
@apply bg-message-box-background-info border-message-box-border-info text-message-box-text-info;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&--success {
|
|
63
|
+
@apply bg-message-box-background-success border-message-box-border-success text-message-box-text-success;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&--warning {
|
|
67
|
+
@apply bg-message-box-background-warning border-message-box-border-warning text-message-box-text-warning;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&--error {
|
|
71
|
+
@apply bg-message-box-background-error border-message-box-border-error text-message-box-text-error;
|
|
72
|
+
}
|
|
73
|
+
|
|
45
74
|
&__head {
|
|
46
75
|
@apply flex justify-between items-center;
|
|
47
76
|
}
|