Skip to content

Commit

Permalink
Improved form design.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Jun 28, 2024
1 parent f4b5bd0 commit 207a3e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/lib/Form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
display: flex;
flex-direction: column;
align-items: baseline;
padding: var(--spacing);
}
form.borders {
Expand Down
6 changes: 4 additions & 2 deletions src/lib/Labeled.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
</script>

<label
><span>{label}</span>
{#if message}<span class="invalid">{message}</span>{/if}
><span
>{label}
{#if message}<span class="invalid">{message}</span>{/if}</span
>
<slot /></label
>

Expand Down
3 changes: 2 additions & 1 deletion src/routes/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
<Field
label="email"
bind:text={email}
invalid={(text) => (text.length === 0 || validEmail(email) ? undefined : 'Not a valid email')}
invalid={(text) =>
text.length === 0 || validEmail(email) ? undefined : 'Not yet a valid email'}
/>
<Button
tip="Email the login code"
Expand Down
5 changes: 4 additions & 1 deletion src/routes/org/[orgid]/people/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@
<Paragraph>This person is already added.</Paragraph>
{/if}
</Form>
<Tip>This will not send an invitation; they can create an account at any time.</Tip>
<Tip
>Adding an email address not send an invitation. They can log in at any time to claim and update
their profile.</Tip
>
{/if}

<style>
Expand Down

0 comments on commit 207a3e8

Please sign in to comment.