Added chip component.
This commit is contained in:
20
JSMR.UI.Blazor/Components/Chip.razor
Normal file
20
JSMR.UI.Blazor/Components/Chip.razor
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
@using JSMR.UI.Blazor.Enums
|
||||||
|
|
||||||
|
<div class="j-chip">
|
||||||
|
@if (Graphic != null)
|
||||||
|
{
|
||||||
|
<Icon Graphic="@Graphic.Value" Color="@Color"></Icon>
|
||||||
|
}
|
||||||
|
<span>@ChildContent</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter]
|
||||||
|
public RenderFragment? ChildContent { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public Graphic? Graphic { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public ColorVarient Color { get; set; } = ColorVarient.Primary;
|
||||||
|
}
|
||||||
@@ -608,6 +608,15 @@ code {
|
|||||||
font-weight: 500;*/
|
font-weight: 500;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Chips */
|
||||||
|
.j-chip {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: .5rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
/* Icons */
|
/* Icons */
|
||||||
.j-icon {
|
.j-icon {
|
||||||
mask-repeat: no-repeat;
|
mask-repeat: no-repeat;
|
||||||
|
|||||||
Reference in New Issue
Block a user