Skip to content

Commit

Permalink
fix: a bit better import UI
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Jan 21, 2024
1 parent 906fe05 commit 024b513
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/views/FormImport.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@
</script>

<div class="vertical mainView">
<p>
<h1>Import a form</h1>
<div>
Import a form by pasting the JSON definition into the box below. You can export a form from
the Form Builder. Any errors in the JSON will be displayed below. You will only be able to
import the form if there are no errors.
</p>
<div class="horizontal">
</div>
<div class="horizontal full-height">
<textarea
bind:value
class="form-input"
placeholder="Paste your form JSON here"
rows={10}
cols={100}
on:input={() => validate(value)}
/>

Expand Down Expand Up @@ -49,21 +48,34 @@
.vertical {
display: flex;
flex-direction: column;
height: 100%;
gap: 1rem;
}
.full-height {
height: 100%;
flex: 1;
}
.horizontal {
display: flex;
flex-direction: row;
gap: 1rem;
height: 100%;
gap: 0.5rem;
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.mainView {
padding: 1rem;
padding: 0.8rem;
min-height: 50vh;
}
p {
margin: 0;
}
textarea {
font-family: monospace;
flex-grow: 1;
flex-shrink: 0;
flex-basis: 50%;
}
</style>

0 comments on commit 024b513

Please sign in to comment.