Add Checkmark component

This commit is contained in:
Ivan Yaremenchuk 2022-08-20 21:37:55 -05:00
parent f002c87a62
commit 06ccd776f1
5 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,5 @@
<span class="checkmark" style=@(AnchorToTopRightCorner ? "position: absolute; top: 1em; right: 1em;" : string.Empty)>
<div class="checkmark_circle"></div>
<div class="checkmark_stem"></div>
<div class="checkmark_kick"></div>
</span>

View File

@ -0,0 +1,8 @@
using Microsoft.AspNetCore.Components;
namespace NftFaucetRadzen.Components;
public partial class Checkmark
{
[Parameter] public bool AnchorToTopRightCorner { get; set; }
}

View File

@ -6,6 +6,7 @@
<div class="d-flex flex-row align-items-center">
<RadzenImage Path=@("./images/" + (network.ImageName ?? "ethereum.svg")) Class="float-left mr-3" Style="width: 80px; height: 80px; margin-right: 1em;" />
<div>
<Checkmark AnchorToTopRightCorner="true" />
<h4 class="mb-0">@network.Name</h4>
@if (network.ChainId.HasValue)
{

View File

@ -6,5 +6,4 @@ namespace NftFaucetRadzen.Components;
public partial class NetworkList
{
[Parameter] public NetworkModel[] Data { get; set; }
}

View File

@ -75,3 +75,40 @@ a, .btn-link {
.non-supported-container {
background-color: #dfdfdf !important;
}
.checkmark {
display:inline-block;
width: 22px;
height:22px;
-ms-transform: rotate(45deg); /* IE 9 */
-webkit-transform: rotate(45deg); /* Chrome, Safari, Opera */
transform: rotate(45deg);
}
.checkmark_circle {
position: absolute;
width:22px;
height:22px;
background-color: green;
border-radius:11px;
left:0;
top:0;
}
.checkmark_stem {
position: absolute;
width:3px;
height:9px;
background-color:#fff;
left:11px;
top:6px;
}
.checkmark_kick {
position: absolute;
width:3px;
height:3px;
background-color:#fff;
left:8px;
top:12px;
}