@teammodlr/ui-kit 2.1.32 → 2.1.33

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": "@teammodlr/ui-kit",
3
- "version": "2.1.32",
3
+ "version": "2.1.33",
4
4
  "description": "",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.es.js",
@@ -1,20 +1,24 @@
1
1
  <template>
2
2
  <div>
3
- <MModal ref="modal" :title="title" :canClickOutside="false" :onClose="onClose">
3
+ <MModal
4
+ ref="modal"
5
+ :title="title"
6
+ :canClickOutside="false"
7
+ :onClose="onClose">
4
8
  <template #body>
5
9
  {{ content }}
6
10
  </template>
7
11
 
8
12
  <template #footer>
9
- <div style="display: flex; flex-grow: 1; justify-content: end;">
10
- <MButton :variant="okVariant" @click="handleOk">
11
- {{ okText ?? 'Okay' }}
12
- </MButton>
13
- <MButton style="margin-left: 8px;" @click="handleCancel">
14
- {{ cancelText ?? 'Cancel' }}
15
- </MButton>
16
- </div>
17
- </template>
13
+ <div style="display: flex; flex-grow: 1; justify-content: end">
14
+ <MButton :variant="okVariant" @click="handleOk">
15
+ {{ okText ?? 'Okay' }}
16
+ </MButton>
17
+ <MButton style="margin-left: 8px" @click="handleCancel">
18
+ {{ cancelText ?? 'Cancel' }}
19
+ </MButton>
20
+ </div>
21
+ </template>
18
22
  </MModal>
19
23
  </div>
20
24
  </template>
@@ -23,10 +27,11 @@
23
27
  import { defineComponent, onMounted, ref } from 'vue';
24
28
  import { useZIndex } from '../../composables/useZIndex';
25
29
  import { confirmProps } from './props';
26
- import MModal from '../modal/Modal.vue';
30
+ import MModal from '../modal/Modal.vue';
31
+ import MButton from '../button/Button.vue';
27
32
 
28
33
  export default defineComponent({
29
- name: "Confirm",
34
+ name: 'Confirm',
30
35
  props: confirmProps,
31
36
  setup(props, { slots }) {
32
37
  const modal = ref();
@@ -36,14 +41,14 @@ export default defineComponent({
36
41
  async function handleCancel(event: MouseEvent) {
37
42
  modal.value?.close();
38
43
  if (props.onCancel) {
39
- await props.onCancel(event)
44
+ await props.onCancel(event);
40
45
  }
41
46
  }
42
47
 
43
48
  async function handleOk(event: MouseEvent) {
44
49
  modal.value?.close();
45
50
  if (props.onOk) {
46
- props.onOk(event)
51
+ props.onOk(event);
47
52
  }
48
53
  }
49
54
  onMounted(() => {
@@ -55,6 +60,6 @@ export default defineComponent({
55
60
  handleCancel
56
61
  };
57
62
  },
58
- components: { MModal }
63
+ components: { MModal, MButton }
59
64
  });
60
65
  </script>