bfg-common 1.2.166 → 1.2.168
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.
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<atoms-modal
|
|
3
|
+
show
|
|
3
4
|
width="580px"
|
|
4
5
|
class="confirm-modal"
|
|
5
|
-
show
|
|
6
6
|
:title="props.headline"
|
|
7
7
|
:second-title="props.subTitle"
|
|
8
8
|
@hide="onHideModal"
|
|
9
9
|
>
|
|
10
10
|
<template #modalBody>
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
<slot name="content">
|
|
12
|
+
<div class="confirm-modal__body">
|
|
13
|
+
<atoms-the-icon
|
|
14
|
+
name="exclamation-triangle"
|
|
15
|
+
class="confirm-modal__icon"
|
|
16
|
+
/>
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
<p class="confirm-modal__text">
|
|
19
|
+
{{ props.description }}
|
|
20
|
+
</p>
|
|
21
|
+
</div>
|
|
22
|
+
</slot>
|
|
21
23
|
</template>
|
|
22
24
|
|
|
23
25
|
<template #modalFooter>
|
|
@@ -36,13 +38,21 @@ import { UI_I_Localization } from '~/models/interfaces'
|
|
|
36
38
|
|
|
37
39
|
const props = withDefaults(
|
|
38
40
|
defineProps<{
|
|
39
|
-
description
|
|
41
|
+
description?: string
|
|
40
42
|
headline?: string
|
|
41
43
|
subTitle?: string
|
|
42
44
|
testId?: string
|
|
43
45
|
type?: 'confirm' | 'remove'
|
|
46
|
+
variantTextButton?: 'ok' | 'confirm' | 'remove'
|
|
44
47
|
}>(),
|
|
45
|
-
{
|
|
48
|
+
{
|
|
49
|
+
testId: 'common-confirmation',
|
|
50
|
+
headline: '',
|
|
51
|
+
subTitle: '',
|
|
52
|
+
type: 'confirm',
|
|
53
|
+
description: '',
|
|
54
|
+
variantTextButton: 'ok',
|
|
55
|
+
}
|
|
46
56
|
)
|
|
47
57
|
const emits = defineEmits<{
|
|
48
58
|
(event: 'hide-modal'): void
|
|
@@ -58,10 +68,10 @@ const currentClasses = computed<string>(() => {
|
|
|
58
68
|
return result
|
|
59
69
|
})
|
|
60
70
|
const currentText = computed<string>(() => {
|
|
61
|
-
if (props.type === 'confirm') return localization.value.ok
|
|
62
|
-
else if (props.type === 'remove') return localization.value.remove
|
|
71
|
+
// if (props.type === 'confirm') return localization.value.ok
|
|
72
|
+
// else if (props.type === 'remove') return localization.value.remove
|
|
63
73
|
|
|
64
|
-
return
|
|
74
|
+
return localization.value[props.variantTextButton]
|
|
65
75
|
})
|
|
66
76
|
|
|
67
77
|
const onApply = (): void => emits('confirm')
|