Skip to content

Commit

Permalink
fix: run image error spacing
Browse files Browse the repository at this point in the history
Fixes error message over top of the field and label as shown in issue #3628.
You can notice the Entrypoint field in the issue is also very close to the
following Command label - both fields did not have the pt-4 padding that every
other field in this form has. Adding this back leaves a blank line for the
error, so I added an if statement as we do in many other uses of ErrorMessage.

Fixes #3628.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
  • Loading branch information
deboer-tim committed Sep 25, 2023
1 parent 977d554 commit d21fcae
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/renderer/src/lib/image/RunImage.svelte
Expand Up @@ -585,16 +585,19 @@ function checkContainerName(event: any) {
class="w-full p-2 outline-none text-sm bg-charcoal-800 rounded-sm text-gray-700 placeholder-gray-700 border {containerNameError
? 'border-red-500'
: 'border-charcoal-800'}" />
<ErrorMessage class="h-1 text-sm" error="{containerNameError}" />
<label for="modalEntrypoint" class="block mb-2 text-sm font-medium text-gray-400 dark:text-gray-400"
>Entrypoint:</label>
{#if containerNameError}
<ErrorMessage class="text-sm" error="{containerNameError}" />
{/if}
<label
for="modalEntrypoint"
class="pt-4 block mb-2 text-sm font-medium text-gray-400 dark:text-gray-400">Entrypoint:</label>
<input
type="text"
bind:value="{entrypoint}"
name="modalEntrypoint"
id="modalEntrypoint"
class="w-full p-2 outline-none text-sm bg-charcoal-800 rounded-sm text-gray-700 placeholder-gray-700 border border-charcoal-800" />
<label for="modalCommand" class="block mb-2 text-sm font-medium text-gray-400 dark:text-gray-400"
<label for="modalCommand" class="pt-4 block mb-2 text-sm font-medium text-gray-400 dark:text-gray-400"
>Command:</label>
<input
type="text"
Expand Down

0 comments on commit d21fcae

Please sign in to comment.