Initial commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
<div class="alertContainer @Type.ToString().ToLower()">
|
||||
@if (Title != null) {
|
||||
<div class="alertTitle">
|
||||
@Title
|
||||
</div>
|
||||
}
|
||||
@if (Message != null) {
|
||||
<div>
|
||||
@Message
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<style>
|
||||
.alertContainer {
|
||||
border: 4px solid;
|
||||
border-radius: 4px;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-items: stretch;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.alertContainer.@SeverityType.Warning.ToString().ToLower() {
|
||||
border-color: #2a2000;
|
||||
background-color: #ffbf0029;
|
||||
}
|
||||
|
||||
.alertContainer.@SeverityType.Error.ToString().ToLower() {
|
||||
border-color: #290102;
|
||||
background-color: #4C2C33;
|
||||
}
|
||||
|
||||
.alertContainer.@SeverityType.Information.ToString().ToLower() {
|
||||
border-color: #030129;
|
||||
background-color: #2c3a4c;
|
||||
}
|
||||
|
||||
.alertContainer.@SeverityType.Success.ToString().ToLower() {
|
||||
border-color: #042901;
|
||||
background-color: #2E4C2C;
|
||||
}
|
||||
|
||||
.alertTitle {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public RenderFragment? Title { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public RenderFragment? Message { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public SeverityType Type { get; set; } = SeverityType.Warning;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<div class="loadingContainer">
|
||||
<div style="flex-grow: 1"></div>
|
||||
<div class="loadingText">
|
||||
Loading...
|
||||
</div>
|
||||
<div style="flex-grow: 3"></div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
@@keyframes loadingKeyframes {
|
||||
0% {
|
||||
font-size: 1.0rem
|
||||
}
|
||||
|
||||
50% {
|
||||
font-size: 1.4rem
|
||||
}
|
||||
|
||||
100% {
|
||||
font-size: 1.0rem
|
||||
}
|
||||
}
|
||||
|
||||
.loadingContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
justify-content: center;
|
||||
background-color: black;
|
||||
border-radius: 4px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.loadingText {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
animation-name: loadingKeyframes;
|
||||
animation-duration: 6s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: ease-in-out;
|
||||
}
|
||||
</style>
|
||||
|
||||
@code {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Components.Feedback;
|
||||
|
||||
public enum SeverityType {
|
||||
Warning,
|
||||
Information,
|
||||
Error,
|
||||
Success
|
||||
}
|
||||
Reference in New Issue
Block a user