Skip to content

Commit e667544

Browse files
committed
Style upload form and hide when config is uploaded
1 parent f73c9d3 commit e667544

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

src/components/Canvas/Canvas.vue

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
<template>
22
<div>
3-
<form class="mb-10">
4-
<input
5-
id="file"
6-
type="file"
7-
name="file"
8-
class="absolute opacity-0 w-0 h-0 overflow-hidden"
9-
@change="fileSelected">
10-
<label for="file" class="inline-block p-4 bg-blue-400 hover:bg-blue-500 text-white">Upload Tailwind Config</label>
11-
</form>
3+
<div
4+
v-if="!config"
5+
style="height: calc(100vh - 63px);"
6+
class="flex items-center justify-center">
7+
<form
8+
class="
9+
flex flex-col
10+
p-16
11+
max-w-sm
12+
rounded-lg
13+
border-2 border-dashed border-bg-gray-200"
14+
>
15+
<p class="mb-3 text-gray-600 text-center font-bold">Upload your Tailwind config file</p>
16+
<input
17+
id="file"
18+
type="file"
19+
name="file"
20+
class="absolute opacity-0 w-0 h-0 overflow-hidden"
21+
@change="fileSelected">
22+
<label for="file" class="inline-block p-4 bg-blue-400 hover:bg-blue-500 rounded cursor-pointer text-center text-white">Upload Tailwind Config</label>
23+
</form>
24+
</div>
1225
<template v-if="config">
13-
<div class="flex">
26+
<div class="pt-8 flex">
1427
<nav class="w-56 flex-none px-3 h-full top-0 sticky">
1528
<h2 class="font-bold text-lg">Sections</h2>
1629
<a

0 commit comments

Comments
 (0)