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.
Connected.Components/Components/Snackbar/SnackbarElement.razor

36 lines
1.0 KiB

2 years ago
@namespace Connected.Components
@inherits UIComponent
@Css
<div @attributes="UserAttributes" class="@SnackbarClass" style="@AnimationStyle" @onclick="@SnackbarClicked">
@if (!HideIcon)
{
<div class="mud-snackbar-icon">
<Icon Icon="@Icon" Color="@IconColor" Size="@IconSize" />
</div>
}
<div class="mud-snackbar-content-message">
@if (Message?.ComponentType != null)
{
<DynamicComponent Type="Message.ComponentType" Parameters="Message.ComponentParameters" />
}
</div>
@if (ShowCloseIcon || ShowActionButton)
{
<div class="mud-snackbar-content-action">
@if (ShowActionButton)
{
<Button Variant="@ActionVariant" Color="@ActionColor" OnClick="ActionClicked" DisableElevation>@Action</Button>
}
@if (ShowCloseIcon)
{
<IconButton Icon="@CloseIcon" Size="Size.Small" Class="ms-2" OnClick="CloseIconClicked" />
}
</div>
}
</div>