File size: 1,754 Bytes
66ed450
7d4e291
be26971
 
7d4e291
 
 
 
 
 
 
 
 
 
 
 
 
66ed450
 
b4efffa
 
66ed450
 
 
aa3e783
66ed450
 
be26971
 
 
b4efffa
 
be26971
b4efffa
be26971
 
 
 
 
66ed450
b4efffa
66ed450
 
b4efffa
66ed450
 
 
 
b4efffa
66ed450
b4efffa
66ed450
b4efffa
66ed450
 
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
53
54
55
56
<script lang="ts">
	import { onMount, createEventDispatcher } from 'svelte';

	const dispatch = createEventDispatcher();

	const onKeyup = (e: KeyboardEvent) => {
		e.preventDefault();
		if (e.key === 'Enter') {
			dispatch('paintMode', { mode: 'paint' });
		}
	};
	onMount(() => {
		window.addEventListener('keyup', onKeyup);
		return () => {
			window.removeEventListener('keyup', onKeyup);
		};
	});
</script>

<div class="grid grid-cols-1 gap-3 w-max mx-auto">
	<!-- <div class="flex items-center">
		<input
			id="showframes"
			type="checkbox"
			bind:checked={$showFrames}
			class="w-4 h-4 text-blue-600 bg-gray-100 rounded border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600 cursor-pointer"
		/>
		<label for="showframes" class="text-white dark:text-white cursor-pointer ml-2">
			Show Frames
		</label>
	</div> -->
	<!-- <button class="button" title="Move" on:click={() => dispatch('paintMode', { mode: 'move' })}>
		Move
	</button> -->
	<button
		class="button-paint bg-violet-100 text-violet-900"
		title="New Paint Frame"
		on:click={() => dispatch('paintMode', { mode: 'paint' })}
	>
		<span
			class="rounded-sm h-6 w-6 flex justify-center items-center border-2 border-dashed border-violet-700 mr-2"
			>+</span
		>
		<span>Paint</span>
	</button>
</div>

<style lang="postcss" scoped>
	/* .button {
		@apply disabled:opacity-50 dark:bg-white dark:text-black bg-black text-white rounded-2xl text-xs shadow-sm focus:outline-none focus:border-gray-400;
	} */
	.button-paint {
		@apply flex justify-center items-center disabled:opacity-50  dark:bg-white dark:text-black rounded-2xl px-3 py-1 shadow-sm focus:outline-none focus:border-gray-400;
	}
</style>