Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 12541de

Browse files
committed
Aggiunto componente CustomAvatar
1 parent db242f7 commit 12541de

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@if (image is not null)
2+
{
3+
<MudAvatar Color="@color" Variant="@variant" Size="@size" square="@square" Image="@image" Alt="@altimage">@text</MudAvatar>
4+
}
5+
else
6+
{
7+
<MudAvatar Color="@color" Variant="@variant" Size="@size" square="@square">@text</MudAvatar>
8+
}
9+
10+
@code {
11+
[Parameter, Required] public string text { get; set; }
12+
[Parameter, Required] public Color color { get; set; }
13+
[Parameter, Required] public Variant variant { get; set; }
14+
[Parameter, Required] public Size size { get; set; }
15+
[Parameter] public bool square { get; set; } = false;
16+
[Parameter] public string image { get; set; } = null;
17+
[Parameter] public string altimage { get; set; } = null;
18+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@using Microsoft.AspNetCore.Components.Web
22
@using System.ComponentModel.DataAnnotations
33

4-
@using MudBlazor
5-
@using MudBlazor.Components
4+
@using MudBlazor

0 commit comments

Comments
 (0)