PluginProbe
The Innovative Form Builder – IvyForms / 0.5
The Innovative Form Builder – IvyForms v0.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / frontend / src / views / admin / testing / testing-page / TestingMessage.vue

TestingMessage.vue in The Innovative Form Builder – IvyForms 0.5, at frontend/src/views/admin/testing/testing-page/TestingMessage.vue

75 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <template>
2 <div>
3 <h3>Message Component Controls</h3>
4 <div class="message-controls">
5 <!-- Message -->
6 <label>
7 Message:
8 <input v-model="message" placeholder="Enter message" />
9 </label>
10
11 <!-- Message Type -->
12 <label>
13 Message Type:
14 <select v-model="messageType">
15 <option value="info">Info</option>
16 <option value="success">Success</option>
17 <option value="warning">Warning</option>
18 <option value="error">Error</option>
19 <option value="default">Default</option>
20 </select>
21 </label>
22 </div>
23 <hr />
24
25 <!-- Alert Preview -->
26 <div class="message-preview">
27 <h3>Message Preview</h3>
28 <IvyButtonAction @click="openMessage">Click for message</IvyButtonAction>
29 </div>
30 </div>
31 </template>
32
33 <script setup lang="ts">
34 import { ref } from 'vue'
35 import IvyMessage from '@/views/_components/message/ivyMessage.ts'
36 const message = ref('This is a message')
37 const messageType = ref<'info' | 'success' | 'warning' | 'error' | 'default'>('info')
38
39 const openMessage = () => {
40 const showMessage = {
41 message: message.value,
42 type: messageType.value,
43 }
44 IvyMessage(showMessage)
45 }
46 </script>
47
48 <style scoped>
49 .message-controls {
50 margin-bottom: 20px;
51 padding: 10px;
52 border: 1px solid #ddd;
53 border-radius: 6px;
54 }
55
56 .message-controls label {
57 display: block;
58 margin-bottom: 10px;
59 }
60
61 .message-preview {
62 margin-top: 20px;
63 }
64
65 .message-preview h3 {
66 margin-bottom: 20px;
67 }
68
69 hr {
70 margin: 20px 0;
71 border: none;
72 border-top: 1px solid #ddd;
73 }
74 </style>
75