ant-design-blazor/components/button/Button.razor
Brian Weiss 14e5d36b3a feat(module: button): add AriaLabel Parameter (#2278)
* feat(module:button) Adds AriaLabel Parameter

Adds in a Parameter for AriaLabel that's used as the value for the aria-label attribute on the button.

* feat(module:button) Adds AriaLabel Parameter

Updates zh-CN documentation and removes blank line.
2022-05-28 13:41:01 +08:00

33 lines
1015 B
C#

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