ant-design-blazor/components/button/Button.razor

22 lines
704 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
<CascadingValue Value="this">
<button class="@ClassMapper.Class" style="@(this.Danger ? this._btnWave + Style:Style)" id="@Id" type="@HtmlType"
@onclick="HandleOnClick" disabled="@Disabled"
@onclick:stopPropagation="@OnClickStopPropagation"
@onmouseup="OnMouseUp"
ant-click-animating-without-extra-node="@(this._animating ? "true":"false")">
@if (Loading)
{
<Icon Type="loading"></Icon>
}
@if (!string.IsNullOrEmpty(Icon))
{
<Icon Type="@Icon" Style="@IconStyle"></Icon>
}
@ChildContent
</button>
</CascadingValue>