Tools.svelte 810 Bytes
Newer Older
Timothy J. Baek's avatar
Timothy J. Baek committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<script>
	import { getContext } from 'svelte';

	const i18n = getContext('i18n');

	import CodeEditor from './Tools/CodeEditor.svelte';

	let loading = false;

	const submitHandler = async () => {
		loading = true;
		// Call the API to submit the code
	};
</script>

<div class=" flex flex-col justify-between w-full overflow-y-auto h-full">
	<div class="mx-auto w-full md:px-0 h-full">
		<div class=" flex flex-col max-h-[100dvh] h-full">
Timothy J. Baek's avatar
Timothy J. Baek committed
19
			<div class="mb-2.5 flex-1 overflow-auto h-0 rounded-lg">
Timothy J. Baek's avatar
Timothy J. Baek committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
				<CodeEditor />
			</div>
			<div class="pb-3">
				<button
					class="px-3 py-1.5 text-sm font-medium bg-emerald-600 hover:bg-emerald-700 text-gray-50 transition rounded-lg"
					on:click={() => {
						submitHandler();
					}}
				>
					{$i18n.t('Save')}
				</button>
			</div>
		</div>
	</div>
</div>