@appscode/design-system 2.4.15 → 2.4.17

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@appscode/design-system",
3
- "version": "2.4.15",
3
+ "version": "2.4.17",
4
4
  "description": "A design system for Appscode websites and dashboards made using Bulma",
5
5
  "main": "main.scss",
6
6
  "scripts": {
@@ -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
- "Lorem, ipsum dolor sit amet consectetur adipisicing elit. Ut eum deserunt facilis natus ipsum eligendi! Consequuntur illo repudiandae at eius nam, ab omnis eveniet obcaecati.",
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 is-success">
16
- <div class="message-body">
17
- <span class="status-icon">
18
- <slot name="icon"></slot>
19
- </span>
20
- <p>{{ message }}</p>
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 v-if="message">{{ 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"