You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
2 years ago
|
@namespace Connected.Components
|
||
|
|
||
|
|
||
|
|
||
|
<div class="@Class">
|
||
|
@if (!string.IsNullOrWhiteSpace(Text))
|
||
|
{
|
||
|
<TextContent Color="@Color" tabindex="-1">@Text</TextContent>
|
||
|
}
|
||
|
else if (!string.IsNullOrWhiteSpace(Icon))
|
||
|
{
|
||
|
@if (AdornmentClick.HasDelegate)
|
||
|
{
|
||
|
<IconButton Icon="@Icon" OnClick="@AdornmentClick" Edge="@Edge" Size="@Size" Color="@Color" aria-label="@(!string.IsNullOrEmpty(AriaLabel) ? AriaLabel : "Icon Button")" tabindex="-1"/>
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
<Icon Glyph="@Icon" Size="@Size" Color="@Color" aria-label="@(!string.IsNullOrEmpty(AriaLabel) ? AriaLabel : "Icon")" tabindex="-1"/>
|
||
|
}
|
||
|
}
|
||
|
</div>
|
||
|
|
||
|
|
||
|
@code {
|
||
|
[Parameter] public string Class { get; set; }
|
||
|
[Parameter] public string Text { get; set; }
|
||
|
[Parameter] public string Icon { get; set; }
|
||
|
[Parameter] public Edge Edge { get; set; }
|
||
|
[Parameter] public Size Size { get; set; } = Size.Medium;
|
||
|
[Parameter] public ThemeColor Color { get; set; } = ThemeColor.Default;
|
||
|
[Parameter] public string AriaLabel { get; set; }
|
||
|
|
||
|
[Parameter] public EventCallback<MouseEventArgs> AdornmentClick { get; set; }
|
||
|
}
|