@appscode/design-system 2.4.14 → 2.4.16
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,25 +1,39 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
|
|
2
4
|
interface Props {
|
|
3
5
|
modifierClasses?: string;
|
|
4
6
|
message?: string;
|
|
7
|
+
hasCrossIcon?: boolean;
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
withDefaults(defineProps<Props>(), {
|
|
8
11
|
modifierClasses: "",
|
|
9
|
-
message:
|
|
10
|
-
|
|
12
|
+
message: "",
|
|
13
|
+
hasCrossIcon: false,
|
|
11
14
|
});
|
|
15
|
+
|
|
16
|
+
const showAlert = ref(true);
|
|
17
|
+
function hideAlert() {
|
|
18
|
+
showAlert.value = false;
|
|
19
|
+
}
|
|
12
20
|
</script>
|
|
13
21
|
|
|
14
22
|
<template>
|
|
15
|
-
<div :class="modifierClasses" class="message
|
|
16
|
-
<div class="message-body">
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
<div v-if="showAlert" :class="modifierClasses" class="message">
|
|
24
|
+
<div class="message-body is-justify-content-space-between">
|
|
25
|
+
<div class="is-flex is-flex-direction-column gap-4 is-fullwidth">
|
|
26
|
+
<div class="is-flex is-align-items-center gap-8">
|
|
27
|
+
<span class="status-icon">
|
|
28
|
+
<slot name="icon"></slot>
|
|
29
|
+
</span>
|
|
30
|
+
<p>{{ message }}</p>
|
|
31
|
+
<slot name="custom-text"></slot>
|
|
32
|
+
</div>
|
|
33
|
+
<slot name="buttons"></slot>
|
|
34
|
+
</div>
|
|
21
35
|
|
|
22
|
-
<button class="button is-text">
|
|
36
|
+
<button v-if="hasCrossIcon" class="button is-text" @click="hideAlert">
|
|
23
37
|
<span class="icon"
|
|
24
38
|
><svg
|
|
25
39
|
xmlns="http://www.w3.org/2000/svg"
|