Recreate blazor error ui in tailwind
This commit is contained in:
parent
eb7a000733
commit
9078b50298
4 changed files with 20 additions and 23 deletions
|
@ -21,8 +21,11 @@
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<div id="blazor-error-ui">
|
<div id="blazor-error-ui"
|
||||||
|
class="bg-yellow-400 bottom-0 shadow-md fixed left-0 py-2 px-4 w-full z-50 hidden"
|
||||||
|
role="alertdialog"
|
||||||
|
tabindex="-1">
|
||||||
An unhandled error has occurred.
|
An unhandled error has occurred.
|
||||||
<a href="" class="reload">Reload</a>
|
<a href="" class="reload underline">Reload</a>
|
||||||
<a class="dismiss">🗙</a>
|
<button class="dismiss" type="button">🗙</button>
|
||||||
</div>
|
</div>
|
|
@ -1,18 +0,0 @@
|
||||||
#blazor-error-ui {
|
|
||||||
background: lightyellow;
|
|
||||||
bottom: 0;
|
|
||||||
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
|
|
||||||
display: none;
|
|
||||||
left: 0;
|
|
||||||
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
|
|
||||||
position: fixed;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#blazor-error-ui .dismiss {
|
|
||||||
cursor: pointer;
|
|
||||||
position: absolute;
|
|
||||||
right: 0.75rem;
|
|
||||||
top: 0.5rem;
|
|
||||||
}
|
|
|
@ -21,6 +21,11 @@
|
||||||
Thanks for visiting!
|
Thanks for visiting!
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p class="mt-4 text-base leading-7 text-slate-900">
|
||||||
|
Click this button to throw an error:
|
||||||
|
<button class="px-4 py-2 bg-brand text-white rounded-md" @onclick="ThrowError">Throw Error</button>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="w-full sm:w-auto">
|
<div class="w-full sm:w-auto">
|
||||||
<div class="mt-10 grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-3">
|
<div class="mt-10 grid grid-cols-1 gap-x-6 gap-y-4 sm:grid-cols-3">
|
||||||
|
@ -67,3 +72,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private void ThrowError()
|
||||||
|
{
|
||||||
|
throw new Exception("This is a test exception");
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue