|
37 | 37 | aria-label="Beautify entered text"
|
38 | 38 | type="button"
|
39 | 39 | title="Beautify"
|
40 |
| - class=" |
41 |
| - absolute |
42 |
| - p-2 |
43 |
| - transition-all |
44 |
| - rounded-sm |
45 |
| - top-16 |
46 |
| - right-3 |
47 |
| - aspect-square |
48 |
| - dark:hover:bg-slate-600 dark:bg-slate-600/50 |
49 |
| - hover:bg-slate-300 |
50 |
| - bg-gray-300/50 |
51 |
| - " |
| 40 | + class="absolute p-2 transition-all rounded-sm top-16 right-3 aspect-square dark:hover:bg-slate-600 dark:bg-slate-600/50 hover:bg-slate-300 bg-gray-300/50" |
52 | 41 | @click="
|
53 | 42 | lhsEditor.trigger('editor', 'editor.action.formatDocument')
|
54 | 43 | "
|
|
88 | 77 | aria-label="Beautify entered text"
|
89 | 78 | type="button"
|
90 | 79 | title="Beautify"
|
91 |
| - class=" |
92 |
| - absolute |
93 |
| - p-2 |
94 |
| - transition-all |
95 |
| - rounded-sm |
96 |
| - top-16 |
97 |
| - right-3 |
98 |
| - aspect-square |
99 |
| - dark:hover:bg-slate-600 dark:bg-slate-600/50 |
100 |
| - hover:bg-slate-300 |
101 |
| - bg-gray-300/50 |
102 |
| - " |
| 80 | + class="absolute p-2 transition-all rounded-sm top-16 right-3 aspect-square dark:hover:bg-slate-600 dark:bg-slate-600/50 hover:bg-slate-300 bg-gray-300/50" |
103 | 81 | @click="
|
104 | 82 | rhsEditor.trigger('editor', 'editor.action.formatDocument')
|
105 | 83 | "
|
|
119 | 97 | </button>
|
120 | 98 | </div>
|
121 | 99 | </section>
|
122 |
| - <div class="self-end flex-grow-0 w-full mt-4 text-center"> |
| 100 | + <div |
| 101 | + class="flex self-end justify-center flex-grow-0 w-full gap-4 mt-4 text-center " |
| 102 | + > |
123 | 103 | <button
|
124 | 104 | id="submitButton"
|
125 |
| - class=" |
126 |
| - inline-flex |
127 |
| - items-center |
128 |
| - justify-center |
129 |
| - w-48 |
130 |
| - px-4 |
131 |
| - py-2 |
132 |
| - transition-transform |
133 |
| - transform |
134 |
| - bg-blue-600 |
135 |
| - rounded-md |
136 |
| - shadow-lg |
137 |
| - outline-none |
138 |
| - text-gray-50 |
139 |
| - focus:ring-4 |
140 |
| - active:scale-y-75 |
141 |
| - " |
| 105 | + class="inline-flex items-center justify-center w-48 gap-4 px-4 py-2 transition-transform transform bg-blue-600 rounded-md shadow-lg outline-none text-gray-50 focus:ring-4 active:scale-y-75" |
142 | 106 | aria-label="Click here to compare the inputted text blocks"
|
143 | 107 | >
|
144 | 108 | Compare
|
| 109 | + <span class="w-4 aspect-square"> |
| 110 | + <svg |
| 111 | + viewBox="0 0 15 15" |
| 112 | + fill="none" |
| 113 | + xmlns="http://www.w3.org/2000/svg" |
| 114 | + width="15" |
| 115 | + height="15" |
| 116 | + > |
| 117 | + <path |
| 118 | + d="M13.5 7.5l-4-4m4 4l-4 4m4-4H1" |
| 119 | + stroke="currentColor" |
| 120 | + ></path> |
| 121 | + </svg> |
| 122 | + </span> |
| 123 | + </button> |
| 124 | + <button |
| 125 | + id="submitButton" |
| 126 | + class="inline-flex items-center justify-center w-48 gap-4 px-4 py-2 text-gray-800 transition-transform transform bg-yellow-300 rounded-md shadow-lg outline-none focus:ring-4 active:scale-y-75" |
| 127 | + aria-label="Click here to clear all the inputs" |
| 128 | + type="button" |
| 129 | + @click="clear" |
| 130 | + > |
| 131 | + <span class="w-4 aspect-square"> |
| 132 | + <svg |
| 133 | + viewBox="0 0 15 15" |
| 134 | + fill="none" |
| 135 | + xmlns="http://www.w3.org/2000/svg" |
| 136 | + width="15" |
| 137 | + height="15" |
| 138 | + > |
| 139 | + <path |
| 140 | + d="M4.5 3V1.5a1 1 0 011-1h4a1 1 0 011 1V3M0 3.5h15m-13.5 0v10a1 1 0 001 1h10a1 1 0 001-1v-10M7.5 7v5m-3-3v3m6-3v3" |
| 141 | + stroke="currentColor" |
| 142 | + ></path> |
| 143 | + </svg> |
| 144 | + </span> |
| 145 | + Clear |
145 | 146 | </button>
|
146 | 147 | </div>
|
147 | 148 | </form>
|
@@ -272,6 +273,10 @@ export default Vue.extend({
|
272 | 273 | theme: 'error',
|
273 | 274 | })
|
274 | 275 | },
|
| 276 | + clear() { |
| 277 | + this.lhsEditor.getModel().setValue('') |
| 278 | + this.rhsEditor.getModel().setValue('') |
| 279 | + }, |
275 | 280 | },
|
276 | 281 | })
|
277 | 282 | </script>
|
|
0 commit comments