@redseed/redseed-ui-vue3 1.0.2 → 1.0.3

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/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  import Card from './src/components/Card/Card.vue'
2
2
  import Image from './src/components/Image/Image.vue'
3
+ import MessageBox from './src/components/MessageBox/MessageBox.vue'
3
4
  import TwoColumnLayout from './src/components/TwoColumnLayout/TwoColumnLayout.vue'
4
5
 
5
6
  export {
6
7
  Card,
7
8
  Image,
9
+ MessageBox,
8
10
  TwoColumnLayout,
9
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redseed/redseed-ui-vue3",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "RedSeed UI Vue 3 components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,56 @@
1
+ <script setup>
2
+ import { ref } from 'vue'
3
+ import { XMarkIcon } from '@heroicons/vue/24/outline'
4
+
5
+ const props = defineProps({
6
+ closed: {
7
+ type: Boolean,
8
+ default: false,
9
+ },
10
+ })
11
+
12
+ const isClosed = ref(props.closed)
13
+
14
+ function close() {
15
+ isClosed.value = true
16
+ }
17
+ </script>
18
+ <template>
19
+ <div v-if="!isClosed"
20
+ class="message-box"
21
+ >
22
+ <div class="message-box__head">
23
+ <div class="message-box__head__title">
24
+ <slot name="title"></slot>
25
+ </div>
26
+ <div class="message-box__head__close">
27
+ <div class="message-box__head__close__icon">
28
+ <XMarkIcon
29
+ @click="close"
30
+ ></XMarkIcon>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ <div class="message-box__body">
35
+ <slot></slot>
36
+ </div>
37
+ </div>
38
+ </template>
39
+ <style lang="scss" scoped>
40
+ .message-box {
41
+ @apply border border-gray-100 rounded-lg bg-white overflow-hidden shadow-full-light transition duration-200 p-4;
42
+ &__head {
43
+ @apply flex justify-between items-center;
44
+ &__close {
45
+ @apply w-10 h-10;
46
+ &__icon {
47
+ @apply w-10 h-10 cursor-pointer rounded-lg flex items-center justify-center;
48
+ @apply hover:bg-gray-100 transition duration-200;
49
+ svg {
50
+ @apply w-6 h-6 text-gray-500;
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ </style>