-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from ThatConference/cs/159
adds error message on invalid form
- Loading branch information
Showing
3 changed files
with
78 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<script> | ||
export let message = 'Error'; | ||
import { onDestroy } from 'svelte'; | ||
import { fade } from 'svelte/transition'; | ||
import Icon from 'svelte-awesome'; | ||
import { warning } from 'svelte-awesome/icons'; | ||
import { Link } from 'yrv'; | ||
import { show } from '../../store/profileNotification'; | ||
let dismissed = false; | ||
</script> | ||
|
||
{#if !dismissed} | ||
<div | ||
class="fixed bottom-0 inset-x-0 pb-2 sm:pb-5" | ||
transition:fade="{{ duration: 1000 }}" | ||
> | ||
<div class="max-w-screen-xl mx-auto px-2 sm:px-6 lg:px-8"> | ||
<div class="p-2 rounded-lg bg-red-400 shadow-lg sm:p-3"> | ||
<div class="flex items-center justify-between flex-wrap"> | ||
<div class="w-0 flex-1 flex items-center"> | ||
<span class="flex p-2 rounded-lg"> | ||
<Icon data="{warning}" class="w-6 h-6 text-white" /> | ||
</span> | ||
<p class="ml-3 font-medium text-white truncate"> | ||
<span class="md:hidden">!</span> | ||
<span class="hidden md:inline">{message}</span> | ||
</p> | ||
</div> | ||
|
||
<div class="order-2 flex-shrink-0 sm:order-3 sm:ml-2"> | ||
<button | ||
type="button" | ||
class="-mr-1 flex p-2 rounded-md hover:bg-indigo-500 | ||
focus:outline-none focus:bg-indigo-500 transition ease-in-out | ||
duration-150" | ||
aria-label="Dismiss" | ||
on:click="{() => (dismissed = !dismissed)}" | ||
> | ||
<svg | ||
class="h-6 w-6 text-white" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
stroke="currentColor" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
stroke-width="2" | ||
d="M6 18L18 6M6 6l12 12" | ||
></path> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{/if} |
cd7140e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: