-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCompositionExample2.vue
52 lines (50 loc) · 1.25 KB
/
CompositionExample2.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<script setup>
import {
CButtonGroup,
CButton,
CAlert,
CAlertIcon,
CAlertTitle,
CAlertDescription
} from '@chakra-ui/vue-next';
import { ref } from 'vue';
const showAlert = ref(true);
</script>
<template>
<CButton
v-if="!showAlert"
border="1px solid rgba(47, 43, 67, 0.1)"
border-radius="2xl"
mr="3"
variant="outline"
box-shadow="0px 1px 3px rgba(47, 43, 67, 0.1), inset 0px -1px 0px rgba(47, 43, 67, 0.1)"
bg="transparent"
@click="showAlert = true"
>
Show Alert
</CButton>
<CAlert
v-if="showAlert"
status="warning"
variant="subtle"
flex-direction="column"
align-items="center"
justify-content="center"
text-align="center"
>
<CAlertIcon />
<CAlertTitle mt="4" mb="1" font-size="lg"
>Before Submitting</CAlertTitle
>
<CAlertDescription max-width="sm" mt="auto" font-weight="normal">
Kindly note that this decision cannot be reversed, once you submit, your
results are uploaded to the database.
</CAlertDescription>
<CButtonGroup variant="outline" mt="4">
<CButton color-scheme="blue" @click="showAlert = false"
>Proceed</CButton
>
<CButton @click="showAlert = false">Cancel</CButton>
</CButtonGroup>
</CAlert>
</template>