ant-design-blazor/components/button/Button.razor
Henry.zhang 5f4af8fce8 fix(module: button): click animating (#310)
* feat: add animating for button component when mouseup event fired

* refactor: animating ? true : false replaced

* fix: wrong color of animating in danger mode for button component

* fix:  reload timer when DelayElapsed。

* fix: replace timer with Task.run

* fix: bugs in button demo

* refactor: clean code

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-07-07 22:45:13 +08:00

21 lines
641 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"
@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>