refactor: remove the 'ant' prefix for some components that is already in demos (#162)

* refactor: button

* refactor: avatar

* refactor: alert

* fix: input group compact
This commit is contained in:
James Yeung 2020-05-29 12:55:15 +08:00 committed by GitHub
parent 5dbe7d86c6
commit d16144ece0
122 changed files with 390 additions and 5462 deletions

7
.gitignore vendored
View File

@ -338,12 +338,11 @@ ASALocalRun/
# BeatPulse healthcheck temp database
healthchecksdb
/components/package-lock.json
package-lock.json
/components/wwwroot/css/ant-design-blazor.css
/components/wwwroot/js/ant-design-blazor.js
/components/wwwroot/js/ant-design-blazor.js.map
/site/AntDesign.Docs/wwwroot/css/docs.css
/site/**/wwwroot/docs
/components/AntDesign.xml
/site/AntDesign.Docs/wwwroot/meta
/site/**/wwwroot/docs
/site/AntBlazor.Docs/wwwroot/css/docs.css
/site/AntBlazor.Docs/wwwroot/meta

View File

@ -101,7 +101,7 @@ WebAssembly 静态托管页面示例
- 最后就可以在`.razor`组件中引用啦!
```html
<AntButton Type="primary">Hello World!</AntButton>
<Button type="primary">Hello World!</Button>
```
## ⌨️ 本地开发

View File

@ -102,7 +102,7 @@ Regularly synchronize with Official Ant Design specifications, you can check the
- Finally, it can be referenced in the `.razor' component!
```html
<AntButton Type="primary">Hello World!</AntButton>
<Button Type="primary">Hello World!</Button>
```
## ⌨️ Local Development

View File

@ -19,104 +19,104 @@
Specifies the scrollable area DOM node
</summary>
</member>
<member name="T:AntDesign.AntAlert">
<member name="T:AntDesign.Alert">
<summary>
Alert component for feedback.
</summary>
</member>
<member name="P:AntDesign.AntAlert.AfterClose">
<member name="P:AntDesign.Alert.AfterClose">
<summary>
Called when close animation is finished
</summary>
</member>
<member name="P:AntDesign.AntAlert.Banner">
<member name="P:AntDesign.Alert.Banner">
<summary>
Whether to show as banner
</summary>
</member>
<member name="P:AntDesign.AntAlert.Closable">
<member name="P:AntDesign.Alert.Closable">
<summary>
Whether Alert can be closed
</summary>
</member>
<member name="P:AntDesign.AntAlert.CloseText">
<member name="P:AntDesign.Alert.CloseText">
<summary>
Close text to show
</summary>
</member>
<member name="P:AntDesign.AntAlert.Description">
<member name="P:AntDesign.Alert.Description">
<summary>
Additional content of Alert
</summary>
</member>
<member name="P:AntDesign.AntAlert.Icon">
<member name="P:AntDesign.Alert.Icon">
<summary>
Custom icon, effective when showIcon is true
</summary>
</member>
<member name="P:AntDesign.AntAlert.Message">
<member name="P:AntDesign.Alert.Message">
<summary>
Content of Aler
</summary>
</member>
<member name="P:AntDesign.AntAlert.ShowIcon">
<member name="P:AntDesign.Alert.ShowIcon">
<summary>
Whether to show icon.
</summary>
</member>
<member name="P:AntDesign.AntAlert.Type">
<member name="P:AntDesign.Alert.Type">
<summary>
Type of Alert styles, options: success, info, warning, error
</summary>
</member>
<member name="P:AntDesign.AntAlert.OnClose">
<member name="P:AntDesign.Alert.OnClose">
<summary>
Callback when Alert is closed.
</summary>
</member>
<member name="P:AntDesign.AntAlert.ChildContent">
<member name="P:AntDesign.Alert.ChildContent">
<summary>
Additional Content
</summary>
</member>
<member name="P:AntDesign.AntAlert.IconType">
<member name="P:AntDesign.Alert.IconType">
<summary>
Icon to show.
</summary>
</member>
<member name="F:AntDesign.AntAlert._isClosed">
<member name="F:AntDesign.Alert._isClosed">
<summary>
Indicator if the component is closed or not.
</summary>
</member>
<member name="F:AntDesign.AntAlert._isClosing">
<member name="F:AntDesign.Alert._isClosing">
<summary>
Just before we close the component we set this indicator to show a closing animation.
</summary>
</member>
<member name="M:AntDesign.AntAlert.SetClassMap">
<member name="M:AntDesign.Alert.SetClassMap">
<summary>
Sets the default classes.
</summary>
</member>
<member name="M:AntDesign.AntAlert.OnParametersSet">
<member name="M:AntDesign.Alert.OnParametersSet">
<summary>
Triggered each time a parameter is changed.
</summary>
</member>
<member name="M:AntDesign.AntAlert.OnInitialized">
<member name="M:AntDesign.Alert.OnInitialized">
<summary>
Start-up code.
</summary>
</member>
<member name="M:AntDesign.AntAlert.OnCloseHandler(Microsoft.AspNetCore.Components.Web.MouseEventArgs)">
<member name="M:AntDesign.Alert.OnCloseHandler(Microsoft.AspNetCore.Components.Web.MouseEventArgs)">
<summary>
Handles the close callback.
</summary>
<param name="args"></param>
<returns></returns>
</member>
<member name="M:AntDesign.AntAlert.AfterCloseHandler(Microsoft.AspNetCore.Components.Web.MouseEventArgs)">
<member name="M:AntDesign.Alert.AfterCloseHandler(Microsoft.AspNetCore.Components.Web.MouseEventArgs)">
<summary>
Handles the after close callback.
</summary>

View File

@ -7,7 +7,7 @@ namespace AntDesign
/// <summary>
/// Alert component for feedback.
/// </summary>
public partial class AntAlert : AntDomComponentBase
public partial class Alert : AntDomComponentBase
{
/// <summary>
/// Called when close animation is finished
@ -61,7 +61,7 @@ namespace AntDesign
/// Type of Alert styles, options: success, info, warning, error
/// </summary>
[Parameter]
public string Type { get; set; } = AntAlertType.Default;
public string Type { get; set; } = AlertType.Default;
/// <summary>
/// Callback when Alert is closed.
@ -79,10 +79,10 @@ namespace AntDesign
/// Icon to show.
/// </summary>
protected string IconType => !string.IsNullOrEmpty(Icon) ? Icon
: Type == AntAlertType.Success ? "check-circle"
: Type == AntAlertType.Info ? "info-circle"
: Type == AntAlertType.Warning ? "exclamation-circle"
: Type == AntAlertType.Error ? "close-circle" : null;
: Type == AlertType.Success ? "check-circle"
: Type == AlertType.Info ? "info-circle"
: Type == AlertType.Warning ? "exclamation-circle"
: Type == AlertType.Error ? "close-circle" : null;
/// <summary>
/// Indicator if the component is closed or not.

View File

@ -1,6 +1,6 @@
namespace AntDesign
{
public static class AntAlertType
public static class AlertType
{
public const string Default = Warning;
public const string Success = "success";
@ -8,4 +8,4 @@
public const string Warning = "warning";
public const string Error = "error";
}
}
}

View File

@ -155,7 +155,7 @@
}
&-slide-up-leave {
animation: antAlertSlideUpOut 0.3s @ease-in-out-circ;
animation: AlertSlideUpOut 0.3s @ease-in-out-circ;
animation-fill-mode: both;
}
@ -166,7 +166,7 @@
}
}
@keyframes antAlertSlideUpIn {
@keyframes AlertSlideUpIn {
0% {
transform: scaleY(0);
transform-origin: 0% 0%;
@ -179,7 +179,7 @@
}
}
@keyframes antAlertSlideUpOut {
@keyframes AlertSlideUpOut {
0% {
transform: scaleY(1);
transform-origin: 0% 0%;

View File

@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Components.Web;
namespace AntDesign
{
public partial class AntAvatar : AntDomComponentBase
public partial class Avatar : AntDomComponentBase
{
[Parameter]
public RenderFragment ChildContent { get; set; }

View File

@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Components.Web;
namespace AntDesign
{
public partial class AntButton : AntDomComponentBase
public partial class Button : AntDomComponentBase
{
[Parameter]
public bool Block { get; set; } = false;
@ -21,7 +21,7 @@ namespace AntDesign
public bool Loading { get; set; } = false;
[Parameter]
public string Type { get; set; } = AntButtonType.Default;
public string Type { get; set; } = ButtonType.Default;
[Parameter]
public string Shape { get; set; } = null;
@ -82,7 +82,7 @@ namespace AntDesign
base.OnInitialized();
//if (Link != null && string.IsNullOrEmpty(this.Type))
//{
// this.Type = AntButtonType.Link;
// this.Type = ButtonType.Link;
//}
SetClassMap();
}

View File

@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Components;
namespace AntDesign
{
public partial class AntButtonGroup : AntDomComponentBase
public partial class ButtonGroup : AntDomComponentBase
{
[Parameter] public RenderFragment ChildContent { get; set; }

View File

@ -5,7 +5,7 @@ using System.Threading.Tasks;
namespace AntDesign
{
public static class AntButtonShape
public static class ButtonShape
{
public const string Circle = "circle";
public const string CircleOutline = "circle-outline";

View File

@ -5,7 +5,7 @@ using System.Threading.Tasks;
namespace AntDesign
{
public class AntButtonSize : AntSizeLDSType
public class ButtonSize : AntSizeLDSType
{
}
}

View File

@ -5,7 +5,7 @@ using System.Threading.Tasks;
namespace AntDesign
{
public static class AntButtonType
public static class ButtonType
{
public const string Default = "default";
public const string Primary = "primary";

View File

@ -156,10 +156,10 @@
</a>
</li>
<li class="@(DatePicker.PrefixCls)-ok">
<AntButton Type="@AntButtonType.Primary"
<Button Type="@ButtonType.Primary"
OnClick="e => DatePicker.Close()">
</AntButton>
</Button>
</li>
</ul>
</div>

View File

@ -149,10 +149,10 @@
</a>
</li>
<li class="@(DatePicker.PrefixCls)-ok">
<AntButton Type="@AntButtonType.Primary"
<Button Type="@ButtonType.Primary"
OnClick="e => DatePicker.Close()">
</AntButton>
</Button>
</li>
</ul>
</div>

View File

@ -16,10 +16,10 @@
<CascadingValue Value="this">
<DropdownGroupButton>
<LeftButton>
<AntButton @key="1" Size="@_buttonSize" Type="@_buttonType" Disabled="@Disabled">@ChildContent</AntButton>
<Button @key="1" Size="@_buttonSize" Type="@_buttonType" Disabled="@Disabled">@ChildContent</Button>
</LeftButton>
<RightButton>
<AntButton @key="2" Size="@_buttonSize" Type="@_buttonType" Disabled="@Disabled" OnClick="OnTriggerClick" Class="ant-dropdown-trigger" Icon="@_rightButtonIcon" />
<Button @key="2" Size="@_buttonSize" Type="@_buttonType" Disabled="@Disabled" OnClick="OnTriggerClick" Class="ant-dropdown-trigger" Icon="@_rightButtonIcon" />
</RightButton>
</DropdownGroupButton>
</CascadingValue>

View File

@ -15,7 +15,7 @@ namespace AntDesign
private string _rightButtonIcon = "ellipsis";
private string _buttonSize = AntSizeLDSType.Default;
private string _buttonType = AntButtonType.Default;
private string _buttonType = ButtonType.Default;
private RenderFragment _leftButton;
private RenderFragment _rightButton;

View File

@ -34,7 +34,7 @@ namespace AntDesign
}
}
private string _type = AntButtonType.Default;
private string _type = ButtonType.Default;
[Parameter]
public string Type
{

View File

@ -1,7 +1,7 @@
@namespace AntDesign.Internal
@inherits AntDomComponentBase
<AntButtonGroup Class="ant-dropdown-button">
<ButtonGroup Class="ant-dropdown-button">
@if (Dropdown.ButtonsRender != null)
{
@Dropdown.ButtonsRender(LeftButton, RightButton)
@ -11,7 +11,7 @@
@LeftButton
@RightButton
}
</AntButtonGroup>
</ButtonGroup>
@code {
[CascadingParameter]

View File

@ -45,7 +45,7 @@ namespace AntDesign
public string TabIndex { get; set; }
[CascadingParameter]
public AntButton Button { get; set; }
public Button Button { get; set; }
[Parameter]
public EventCallback<MouseEventArgs> OnClick { get; set; }

View File

@ -11,10 +11,10 @@ namespace AntDesign
public RenderFragment ChildContent { get; set; }
[Parameter]
public string Size { get; set; }
public bool Compact { get; set; }
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object> Attributes { get; set; }
[Parameter]
public string Size { get; set; }
protected override void OnInitialized()
{
@ -24,7 +24,7 @@ namespace AntDesign
.Add(PrefixCls)
.If($"{PrefixCls}-lg", () => Size == InputSize.Large)
.If($"{PrefixCls}-sm", () => Size == InputSize.Small)
.If($"{PrefixCls}-compact", () => Attributes != null && Attributes.ContainsKey("compact"));
.If($"{PrefixCls}-compact", () => Compact);
}
}
}

View File

@ -37,7 +37,7 @@ namespace AntDesign
{
AddOnAfter = new RenderFragment((builder) =>
{
builder.OpenComponent<AntButton>(_sequence++);
builder.OpenComponent<Button>(_sequence++);
builder.AddAttribute(_sequence++, "class", $"{PrefixCls}-search-button");
builder.AddAttribute(_sequence++, "type", "primary");
builder.AddAttribute(_sequence++, "size", Size);

View File

@ -6,7 +6,7 @@
@if (Avatar.IsT0 && Avatar.AsT0 != "")
{
<div class="ant-list-item-meta-avatar">
<AntAvatar Src="@Avatar.AsT0"></AntAvatar>
<Avatar Src="@Avatar.AsT0"></Avatar>
</div>
}

View File

@ -50,7 +50,7 @@ namespace AntDesign
public Menu Menu { get; set; }
[CascadingParameter]
public AntButton Button { get; set; }
public Button Button { get; set; }
[Inject] private NavigationManager NavigationManger { get; set; }

View File

@ -77,8 +77,8 @@
</div>
</div>
<div class="ant-transfer-operation">
<AntButton Disabled="@(_leftButtonDisabled||Disabled)" Size="@AntSizeLDSType.Small" Icon="left" Type="@AntButtonType.Primary" OnClick="@(e=>MoveItem(e,TransferDirection.Left))">@Operations[0]</AntButton>
<AntButton Disabled="@(_rightButtonDisabled||Disabled)" Size="@AntSizeLDSType.Small" Icon="right" Type="@AntButtonType.Primary" OnClick="@(e=>MoveItem(e,TransferDirection.Right))">@Operations[1]</AntButton>
<Button Disabled="@(_leftButtonDisabled||Disabled)" Size="@AntSizeLDSType.Small" Icon="left" Type="@ButtonType.Primary" OnClick="@(e=>MoveItem(e,TransferDirection.Left))">@Operations[0]</Button>
<Button Disabled="@(_rightButtonDisabled||Disabled)" Size="@AntSizeLDSType.Small" Icon="right" Type="@ButtonType.Primary" OnClick="@(e=>MoveItem(e,TransferDirection.Right))">@Operations[1]</Button>
</div>
<div class="ant-transfer-list @(Footer.Value!=null?FooterClass:"")" @onscroll="@(e => HandleScroll(TransferDirection.Right, e))" style="@Style">
<div class="ant-transfer-list-header">

View File

@ -104,7 +104,7 @@ Regularly synchronize with Official Ant Design specifications, you can check the
- Finally, it can be referenced in the `.razor' component!
```html
<AntButton Type="primary">Hello World!</AntButton>
<Button Type="primary">Hello World!</Button>
```
## 🔨 Local Development

View File

@ -101,7 +101,7 @@ title: Ant Design of Blazor
- 最后就可以在`.razor`组件中引用啦!
```
<AntButton Type="primary">Hello World!</AntButton>
<Button Type="primary">Hello World!</Button>
```
## 🔨 本地开发

View File

@ -1,19 +1,19 @@
<AntAlert Type="@AntAlertType.Warning"
<Alert Type="@AlertType.Warning"
Message="Warning Text"
Banner
Closable />
<AntAlert Type="@AntAlertType.Warning"
<Alert Type="@AlertType.Warning"
Message="Warning Text"
Description="Very long warning text warning text text text text text text text"
Banner
Closable />
<AntAlert Type="@AntAlertType.Warning"
<Alert Type="@AlertType.Warning"
Message="Warning Text Without Icon"
Banner
ShowIcon="false" />
<AntAlert Type="@AntAlertType.Error"
<Alert Type="@AlertType.Error"
Message="Error Text"
Banner />

View File

@ -1 +1 @@
<AntAlert Type="@AntAlertType.Success" Message="Success Text" />
<Alert Type="@AlertType.Success" Message="Success Text" />

View File

@ -1,9 +1,9 @@
<AntAlert Type="@AntAlertType.Warning"
<Alert Type="@AlertType.Warning"
Message="Warning Text Warning Text Warning Text Warning Text Warning Text Warning Text Warning Text"
Closable
OnClose="LogSomething" />
<AntAlert Type="@AntAlertType.Error"
<Alert Type="@AlertType.Error"
Message="Error Text"
Description="Error Description Error Description Error Description Error Description Error Description Error Description"
Closable

View File

@ -1 +1 @@
<AntAlert Message="Info Text" Type="@AntAlertType.Info" CloseText="Close Now" Closable/>
<Alert Message="Info Text" Type="@AlertType.Info" CloseText="Close Now" Closable/>

View File

@ -1,15 +1,15 @@
<AntAlert Message="Success Text"
<Alert Message="Success Text"
Description="Success Description Success Description Success Description"
Type="@AntAlertType.Success" />
Type="@AlertType.Success" />
<AntAlert Message="Info Text"
<Alert Message="Info Text"
Description="Info Description Info Description Info Description Info Description"
Type="@AntAlertType.Info" />
Type="@AlertType.Info" />
<AntAlert Message="Warning Text"
<Alert Message="Warning Text"
Description="Warning Description Warning Description Warning Description Warning Description"
Type="@AntAlertType.Warning" />
Type="@AlertType.Warning" />
<AntAlert Message="Error Text"
<Alert Message="Error Text"
Description="Error Description Error Description Error Description Error Description"
Type="@AntAlertType.Error" />
Type="@AlertType.Error" />

View File

@ -1,35 +1,35 @@
<AntAlert Type="@AntAlertType.Success"
<Alert Type="@AlertType.Success"
Message="Success Tips"
ShowIcon />
<AntAlert Type="@AntAlertType.Info"
<Alert Type="@AlertType.Info"
Message="Informational Notes"
ShowIcon />
<AntAlert Type="@AntAlertType.Warning"
<Alert Type="@AlertType.Warning"
Message="Warning"
ShowIcon />
<AntAlert Type="@AntAlertType.Error"
<Alert Type="@AlertType.Error"
Message="Error"
ShowIcon />
<AntAlert Type="@AntAlertType.Success"
<Alert Type="@AlertType.Success"
Message="Success Tips"
Description="Detailed description and advice about successful copywriting."
ShowIcon />
<AntAlert Type="@AntAlertType.Info"
<Alert Type="@AlertType.Info"
Message="Informational Notes"
Description="Additional description and information about copywriting."
ShowIcon />
<AntAlert Type="@AntAlertType.Warning"
<Alert Type="@AlertType.Warning"
Message="Warning"
Description="This is a warning notice about copywriting."
ShowIcon />
<AntAlert Type="@AntAlertType.Error"
<Alert Type="@AlertType.Error"
Message="Error"
Description="This is an error message about copywriting."
ShowIcon />

View File

@ -1,7 +1,7 @@
<AntAlert Message="Success Text" Type="@AntAlertType.Success" />
<Alert Message="Success Text" Type="@AlertType.Success" />
<AntAlert Message="Info Text" Type="@AntAlertType.Info" />
<Alert Message="Info Text" Type="@AlertType.Info" />
<AntAlert Message="Warning Text" Type="@AntAlertType.Warning" />
<Alert Message="Warning Text" Type="@AlertType.Warning" />
<AntAlert Message="Error Text" Type="@AntAlertType.Error" />
<Alert Message="Error Text" Type="@AlertType.Error" />

View File

@ -1,12 +1,12 @@
<div>
<span class="avatar-item">
<Badge Count="1">
<AntAvatar Shape="square" Icon="user" />
<Avatar Shape="square" Icon="user" />
</Badge>
</span>
<span>
<Badge Dot>
<AntAvatar Shape="square" Icon="user"/>
<Avatar Shape="square" Icon="user"/>
</Badge>
</span>
</div>

View File

@ -1,14 +1,14 @@
<div>
<div>
<AntAvatar Size="64" Icon="user" />
<AntAvatar Size="large" Icon="user" />
<AntAvatar Icon="user" />
<AntAvatar Size="small" Icon="user" />
<Avatar Size="64" Icon="user" />
<Avatar Size="large" Icon="user" />
<Avatar Icon="user" />
<Avatar Size="small" Icon="user" />
</div>
<div>
<AntAvatar Shape="square" Size="64" Icon="user" />
<AntAvatar Shape="square" Size="large" Icon="user" />
<AntAvatar Shape="square" Icon="user" />
<AntAvatar Shape="square" Size="small" Icon="user" />
<Avatar Shape="square" Size="64" Icon="user" />
<Avatar Shape="square" Size="large" Icon="user" />
<Avatar Shape="square" Icon="user" />
<Avatar Shape="square" Size="small" Icon="user" />
</div>
</div>

View File

@ -1,14 +1,14 @@
<div>
<AntAvatar Style="@($"background-color: {color}; vertical-align: middle;")" Size="large">
<Avatar Style="@($"background-color: {color}; vertical-align: middle;")" Size="large">
@user
</AntAvatar>
<AntButton
</Avatar>
<Button
Size="small"
Style="margin:0 16px; vertical-align: middle;"
OnClick="_=>changeUser()"
>
Change
</AntButton>
</Button>
</div>
@code

View File

@ -1,8 +1,8 @@
<div>
<AntAvatar Icon="user" />
<AntAvatar>U</AntAvatar>
<AntAvatar>USER</AntAvatar>
<AntAvatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
<AntAvatar Style="color: #f56a00; background-color: #fde3cf; ">U</AntAvatar>
<AntAvatar Style="background-color: #87d068" Icon="user" />
<Avatar Icon="user" />
<Avatar>U</Avatar>
<Avatar>USER</Avatar>
<Avatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
<Avatar Style="color: #f56a00; background-color: #fde3cf; ">U</Avatar>
<Avatar Style="background-color: #87d068" Icon="user" />
</div>

View File

@ -3,14 +3,14 @@
<Badge Count="@count">
<a href="#" class="head-example" />
</Badge>
<AntButtonGroup>
<AntButton @onclick="_=>decline()">
<ButtonGroup>
<Button @onclick="_=>decline()">
<AntIcon Type="minus"></AntIcon>
</AntButton>
<AntButton @onclick="_=>increase()">
</Button>
<Button @onclick="_=>increase()">
<AntIcon Type="plus"></AntIcon>
</AntButton>
</AntButtonGroup>
</Button>
</ButtonGroup>
</div>
<div style="margin-top: 10px">
<Badge Dot="@show">

View File

@ -1,6 +1,6 @@
<div>
<AntButton Type="primary">Primary</AntButton>
<AntButton>Default</AntButton>
<AntButton Type="dashed">Dashed</AntButton>
<AntButton Type="link">Link</AntButton>
<Button Type="primary">Primary</Button>
<Button>Default</Button>
<Button Type="dashed">Dashed</Button>
<Button Type="link">Link</Button>
</div>

View File

@ -1,6 +1,6 @@
<div>
<AntButton Type="primary" Block>Primary</AntButton>
<AntButton Block>Default</AntButton>
<AntButton Type="dashed" Block>Dashed</AntButton>
<AntButton Type="link" Block>Link</AntButton>
<Button Type="primary" Block>Primary</Button>
<Button Block>Default</Button>
<Button Type="dashed" Block>Dashed</Button>
<Button Type="link" Block>Link</Button>
</div>

View File

@ -1,12 +1,12 @@
<div>
<AntButton Type="primary" Danger>
<Button Type="primary" Danger>
Primary
</AntButton>
<AntButton Danger>Default</AntButton>
<AntButton Type="dashed" Danger>
</Button>
<Button Danger>Default</Button>
<Button Type="dashed" Danger>
link
</AntButton>
<AntButton Type="link" Danger>
</Button>
<Button Type="link" Danger>
link
</AntButton>
</Button>
</div>

View File

@ -1,37 +1,37 @@
<div>
<AntButton Type="primary">Primary</AntButton>
<AntButton Type="primary" Disabled>
<Button Type="primary">Primary</Button>
<Button Type="primary" Disabled>
Primary(disabled)
</AntButton>
</Button>
<br />
<AntButton>Default</AntButton>
<AntButton Disabled>Default(disabled)</AntButton>
<Button>Default</Button>
<Button Disabled>Default(disabled)</Button>
<br />
<AntButton Type="dashed">Dashed</AntButton>
<AntButton Type="dashed" Disabled>
<Button Type="dashed">Dashed</Button>
<Button Type="dashed" Disabled>
Dashed(disabled)
</AntButton>
</Button>
<br />
<AntButton Type="link">Link</AntButton>
<AntButton Type="link" Disabled>
<Button Type="link">Link</Button>
<Button Type="link" Disabled>
Link(disabled)
</AntButton>
</Button>
<br />
<AntButton Type="link" Danger>
<Button Type="link" Danger>
Danger Link
</AntButton>
<AntButton Type="link" Danger Disabled>
</Button>
<Button Type="link" Danger Disabled>
Danger Link(disabled)
</AntButton>
</Button>
<br />
<AntButton Danger>Danger Default</AntButton>
<AntButton Danger Disabled>
<Button Danger>Danger Default</Button>
<Button Danger Disabled>
Danger Default(disabled)
</AntButton>
<div class="site-AntButton-Ghost-wrapper">
<AntButton Ghost>Ghost</AntButton>
<AntButton Ghost Disabled>
</Button>
<div class="site-Button-Ghost-wrapper">
<Button Ghost>Ghost</Button>
<Button Ghost Disabled>
Ghost(disabled)
</AntButton>
</Button>
</div>
</div>

View File

@ -1,12 +1,12 @@
<div class="site-AntButton-Ghost-wrapper">
<AntButton Type="primary" Ghost>
<div class="site-Button-Ghost-wrapper">
<Button Type="primary" Ghost>
Primary
</AntButton>
<AntButton Ghost>Default</AntButton>
<AntButton Type="dashed" Ghost>
</Button>
<Button Ghost>Default</Button>
<Button Type="dashed" Ghost>
link
</AntButton>
<AntButton Type="link" Ghost>
</Button>
<Button Type="link" Ghost>
link
</AntButton>
</Button>
</div>

View File

@ -1,26 +1,26 @@
<div>
@*<Tooltip title="search">
<AntButton Type="primary" shape="circle" icon={<SearchOutlined />} />
<Button Type="primary" shape="circle" icon={<SearchOutlined />} />
</Tooltip>*@
<AntButton Type="primary" Shape="circle">
<Button Type="primary" Shape="circle">
A
</AntButton>
<AntButton Type="primary" Icon="search">
</Button>
<Button Type="primary" Icon="search">
Search
</AntButton>
</Button>
@*<Tooltip title="search">
<AntButton shape="circle" icon={<SearchOutlined />} />
<Button shape="circle" icon={<SearchOutlined />} />
</Tooltip>*@
<AntButton Icon="search">Search</AntButton>
<Button Icon="search">Search</Button>
<br />
@*<Tooltip title="search">
<AntButton shape="circle" icon={<SearchOutlined />} />
<Button shape="circle" icon={<SearchOutlined />} />
</Tooltip>*@
<AntButton Icon="search">Search</AntButton>
<Button Icon="search">Search</Button>
@*<Tooltip title="search">
<AntButton Type="dashed" shape="circle" icon={<SearchOutlined />} />
<Button Type="dashed" shape="circle" icon={<SearchOutlined />} />
</Tooltip>*@
<AntButton Type="dashed" Icon="search">
<Button Type="dashed" Icon="search">
Search
</AntButton>
</Button>
</div>

View File

@ -1,12 +1,12 @@
<AntButtonGroup Size="small">
<AntButton Type="primary">Button 1</AntButton>
<AntButton Type="primary">Button 2</AntButton>
</AntButtonGroup>
<AntButtonGroup>
<AntButton Type="primary">Button 1</AntButton>
<AntButton Type="primary">Button 2</AntButton>
</AntButtonGroup>
<AntButtonGroup Size="large">
<AntButton Type="primary">Button 1</AntButton>
<AntButton Type="primary">Button 2</AntButton>
</AntButtonGroup>
<ButtonGroup Size="small">
<Button Type="primary">Button 1</Button>
<Button Type="primary">Button 2</Button>
</ButtonGroup>
<ButtonGroup>
<Button Type="primary">Button 1</Button>
<Button Type="primary">Button 2</Button>
</ButtonGroup>
<ButtonGroup Size="large">
<Button Type="primary">Button 1</Button>
<Button Type="primary">Button 2</Button>
</ButtonGroup>

View File

@ -1,24 +1,24 @@
@using System.Timers
<div>
<AntButton Type="primary" Loading>
<Button Type="primary" Loading>
Loading
</AntButton>
<AntButton Type="primary" Size="small" Loading>
</Button>
<Button Type="primary" Size="small" Loading>
Loading
</AntButton>
</Button>
<br />
<AntButton Type="primary" Loading="loading" OnClick=enterLoading>
<Button Type="primary" Loading="loading" OnClick=enterLoading>
Click me!
</AntButton>
<AntButton
</Button>
<Button
Type="primary"
Icon="poweroff"
Loading="iconLoading"
OnClick="enterIconLoading"
>
Click me!
</AntButton>
</Button>
</div>
@code

View File

@ -6,27 +6,27 @@
</RadioGroup>
<br />
<br />
<AntButton Type="primary" Size=@size>
<Button Type="primary" Size=@size>
Primary
</AntButton>
<AntButton Size="@size">Default</AntButton>
<AntButton Type="dashed" Size=@size>
</Button>
<Button Size="@size">Default</Button>
<Button Type="dashed" Size=@size>
Dashed
</AntButton>
</Button>
<br />
<AntButton Type="link" Size=@size>
<Button Type="link" Size=@size>
Link
</AntButton>
</Button>
<br />
<AntButton Type="primary" Icon="download" Size=@size />
<AntButton Type="primary" Shape="circle" Icon="download" Size=@size />
<AntButton Type="primary" Shape="round" Icon="download" Size=@size />
<AntButton Type="primary" Shape="round" Icon="download" Size=@size>
<Button Type="primary" Icon="download" Size=@size />
<Button Type="primary" Shape="circle" Icon="download" Size=@size />
<Button Type="primary" Shape="round" Icon="download" Size=@size />
<Button Type="primary" Shape="round" Icon="download" Size=@size>
Download
</AntButton>
<AntButton Type="primary" Icon="download" Size=@size>
</Button>
<Button Type="primary" Icon="download" Size=@size>
Download
</AntButton>
</Button>
</div>
@code

View File

@ -7,8 +7,8 @@
</Checkbox>
</p>
<p>
<AntButton Type="primary" Size="small" @onclick="@CheckClick">@checkTitle</AntButton>
<AntButton Type="primary" Size="small" @onclick="@DisableClick">@disableTitle</AntButton>
<Button Type="primary" Size="small" @onclick="@CheckClick">@checkTitle</Button>
<Button Type="primary" Size="small" @onclick="@DisableClick">@disableTitle</Button>
</p>
</div>

View File

@ -1,5 +1,5 @@
<div>
<AntButton Type="primary" @onclick="_=>open()">Open</AntButton>
<Button Type="primary" @onclick="_=>open()">Open</Button>
<Drawer Closable="true" Visible="visible" Placement="right" Title='("Basic Drawer")' OnClose="_=>close()">
<p>Some contents...</p>
<p>Some contents...</p>

View File

@ -1,5 +1,5 @@
<div>
<AntButton Icon="plus" Type="primary" @onclick="_=>open()">New account</AntButton>
<Button Icon="plus" Type="primary" @onclick="_=>open()">New account</Button>
<Drawer Closable="true" Width="720" Visible="visible" Title='("Submit from in Drawer")' OnClose="_=>close()">
<Template style="height:90%">
<AntRow Gutter="16">
@ -42,8 +42,8 @@
</AntCol>
<AntCol Span="6">
<AntButton Type="default">Cancel</AntButton>
<AntButton Type="primary">Submit</AntButton>
<Button Type="default">Cancel</Button>
<Button Type="primary">Submit</Button>
</AntCol>
</AntRow>
</Template>

View File

@ -1,10 +1,10 @@
<div>
<AntButton Type="primary" OnClick="_=>open()">Open</AntButton>
<Button Type="primary" OnClick="_=>open()">Open</Button>
<Drawer Width="@wdFirstLayer" Closable="true" Visible="visible1" Title='("Multi-level drawer")' OnClose="_=>close()">
<AntButton Type="primary" OnClick="_=>ShowDrawer()">Two-level Drawer</AntButton>
<Button Type="primary" OnClick="_=>ShowDrawer()">Two-level Drawer</Button>
<Drawer Width="260" Closable="true" Visible="visible2" Title='("two-level drawer")' OnClose="_=>CloseDrawer()">
<AntButton Type="primary">This is two-level drawer</AntButton>
<Button Type="primary">This is two-level drawer</Button>
</Drawer>
</Drawer>

View File

@ -6,7 +6,7 @@
<Radio Value="left">left</Radio>
</RadioGroup>
<AntButton Type="primary" @onclick="_ => open()">Open</AntButton>
<Button Type="primary" @onclick="_ => open()">Open</Button>
<Drawer Closable="true" Visible="@visible" Placement="@placement" Title='("Drawer in different Placement")' OnClose="_ => close()">
<p>Some contents...</p>
<p>Some contents...</p>

View File

@ -2,7 +2,7 @@
<div style="height:200px;overflow:hidden;position:relative;border:1px solid #ebedf0; border-radius:2px;padding:48px;text-align:center;background:#fafafa">
Render in this
<div style="margin-top: 16px">
<AntButton Type="primary" @onclick="_=>open()">Open</AntButton>
<Button Type="primary" @onclick="_=>open()">Open</Button>
</div>
<Drawer Style="position:absolute" Visible="visible" Placement="right" Title='("Basic Drawer")' OnClose="_=>close()">

View File

@ -9,7 +9,7 @@
</AntListItemMeta>
<AntButton Type="@AntButtonType.Link" OnClick="(e)=>open(e, item.Title)">View Profile</AntButton>
<Button Type="@ButtonType.Link" OnClick="(e)=>open(e, item.Title)">View Profile</Button>
</Item>
</AntList>

View File

@ -35,7 +35,7 @@
@_overlayMenu
</Overlay>
<ChildContent>
<AntButton>Button <AntIcon Type="down" /></AntButton>
<Button>Button <AntIcon Type="down" /></Button>
</ChildContent>
</Dropdown>

View File

@ -3,7 +3,7 @@
@_overlayMenu
</Overlay>
<ChildContent>
<AntButton>BottomLeft</AntButton>
<Button>BottomLeft</Button>
</ChildContent>
</Dropdown>
<Dropdown Placement="@PlacementType.BottomCenter">
@ -11,7 +11,7 @@
@_overlayMenu
</Overlay>
<ChildContent>
<AntButton>BottomCenter</AntButton>
<Button>BottomCenter</Button>
</ChildContent>
</Dropdown>
<Dropdown Placement="@PlacementType.BottomRight">
@ -19,7 +19,7 @@
@_overlayMenu
</Overlay>
<ChildContent>
<AntButton>BottomRight</AntButton>
<Button>BottomRight</Button>
</ChildContent>
</Dropdown>
<Dropdown Placement="@PlacementType.TopLeft">
@ -27,7 +27,7 @@
@_overlayMenu
</Overlay>
<ChildContent>
<AntButton>TopLeft</AntButton>
<Button>TopLeft</Button>
</ChildContent>
</Dropdown>
<Dropdown Placement="@PlacementType.TopCenter">
@ -35,7 +35,7 @@
@_overlayMenu
</Overlay>
<ChildContent>
<AntButton>TopCenter</AntButton>
<Button>TopCenter</Button>
</ChildContent>
</Dropdown>
<Dropdown Placement="@PlacementType.TopRight">
@ -43,7 +43,7 @@
@_overlayMenu
</Overlay>
<ChildContent>
<AntButton>TopRight</AntButton>
<Button>TopRight</Button>
</ChildContent>
</Dropdown>

View File

@ -1,7 +1,7 @@
<Empty Image='"https://gw.alipayobjects.com/zos/antfincdn/ZHrcdLPrvN/empty.svg"'
ImageStyle='@("height: 60px")'
Description="customDescription">
<AntButton type="@AntButtonType.Primary">Create Now</AntButton>
<Button type="@ButtonType.Primary">Create Now</Button>
</Empty>
@code {

View File

@ -1,17 +1,17 @@
<div>
<AntDesign.Input DefaultValue="mysite">
<Input DefaultValue="mysite">
<AddOnBefore>https://</AddOnBefore>
<AddOnAfter>.com</AddOnAfter>
</AntDesign.Input>
</Input>
<br />
<br />
<AntDesign.Input DefaultValue="mysite">
<Input DefaultValue="mysite">
<AddOnAfter><AntIcon type="setting"></AntIcon></AddOnAfter>
</AntDesign.Input>
</Input>
<br />
<br />
<AntDesign.Input DefaultValue="mysite">
<Input DefaultValue="mysite">
<AddOnBefore>https://</AddOnBefore>
</AntDesign.Input>
</Input>
</div>

View File

@ -1,11 +1,11 @@
<div>
<AntDesign.TextArea Placeholder="Autosize height based on content lines" AutoSize="true" @bind-Value="@txtValue"/>
<TextArea Placeholder="Autosize height based on content lines" AutoSize="true" @bind-Value="@txtValue"/>
<br />
<br />
<AntDesign.TextArea Placeholder="Autosize height based on content lines" MinRows="2" MaxRows="6" @bind-Value="@txtValue"/>
<TextArea Placeholder="Autosize height based on content lines" MinRows="2" MaxRows="6" @bind-Value="@txtValue"/>
<br />
<br />
<AntDesign.TextArea Placeholder="Autosize height based on content lines" MinRows="3" MaxRows="5" @bind-Value="@txtValue"/>
<TextArea Placeholder="Autosize height based on content lines" MinRows="3" MaxRows="5" @bind-Value="@txtValue"/>
</div>
@code{

View File

@ -1,5 +1,5 @@
<div>
<AntDesign.Input Placeholder="Basic usage" @bind-Value="@txtValue"/>
<Input Placeholder="Basic usage" @bind-Value="@txtValue"/>
<br />
<br />
<AntText>@txtValue</AntText>

View File

@ -19,7 +19,7 @@
<br />
<InputGroup Compact>
<Input DefaultValue="0571" Style="width: 20%;" @bind-Value="code" />
<AntDesign.Search DefaultValue="26888888" Style="width: 30%;" @bind-Value="phonenumber" />
<Search DefaultValue="26888888" Style="width: 30%;" @bind-Value="phonenumber" />
</InputGroup>
<br />
<br />

View File

@ -1,15 +1,15 @@
<div>
<AntDesign.Input Placeholder="Prefix and Suffix" DefaultValue="123" @bind-Value="@txtValue" >
<Input Placeholder="Prefix and Suffix" DefaultValue="123" @bind-Value="@txtValue" >
<Prefix>
<AntIcon Type="user" />
</Prefix>
</AntDesign.Input>
</Input>
<br />
<br />
<AntDesign.Input Placeholder="default size" @bind-Value="@txtValue">
<Input Placeholder="default size" @bind-Value="@txtValue">
<Prefix> </Prefix>
<Suffix>RMB </Suffix>
</AntDesign.Input>
</Input>
</div>
@code {

View File

@ -1,21 +0,0 @@
<div>
<AntDesign.Search Placeholder="input search text" Size="@InputSize.Small" @bind-Value="@txtValue" />
<br />
<br />
<AntDesign.Search Placeholder="input search text" OnChange="(e)=>Handle(e)" EnterButton="true" @bind-Value="@txtValue" />
<br />
<br />
<AntDesign.Search Placeholder="input search text" Size="@InputSize.Large" EnterButton="@("Search")" @bind-Value="@txtValue" />
</div>
@code{
private string txtValue { get; set; }
private void Handle(ChangeEventArgs args)
{
Console.WriteLine(args.Value.ToString());
}
}

View File

@ -0,0 +1,21 @@
<div>
<Search Placeholder="input search text" Size="@InputSize.Small" @bind-Value="@txtValue" />
<br />
<br />
<Search Placeholder="input search text" OnChange="(e)=>Handle(e)" EnterButton="true" @bind-Value="@txtValue" />
<br />
<br />
<Search Placeholder="input search text" Size="@InputSize.Large" EnterButton="@("Search")" @bind-Value="@txtValue" />
</div>
@code{
private string txtValue { get; set; }
private void Handle(ChangeEventArgs args)
{
Console.WriteLine(args.Value.ToString());
}
}

View File

@ -1,23 +1,23 @@
<div>
<AntDesign.Input Placeholder="large size" Size="@InputSize.Large" @bind-Value="@txtValue" >
<Input Placeholder="large size" Size="@InputSize.Large" @bind-Value="@txtValue" >
<Prefix>
<AntIcon Type="user" />
</Prefix>
</AntDesign.Input>
</Input>
<br />
<br />
<AntDesign.Input Placeholder="default size" @bind-Value="@txtValue" >
<Input Placeholder="default size" @bind-Value="@txtValue" >
<Prefix>
<AntIcon Type="user" />
</Prefix>
</AntDesign.Input>
</Input>
<br />
<br />
<AntDesign.Input Placeholder="small size" Size="@InputSize.Small" @bind-Value="@txtValue" >
<Input Placeholder="small size" Size="@InputSize.Small" @bind-Value="@txtValue" >
<Prefix>
<AntIcon Type="user" />
</Prefix>
</AntDesign.Input>
</Input>
<br />
<br />
<InputPassword @bind-Value="@txtValue" Placeholder="large Password" Size="@InputSize.Large" OnPressEnter="(e)=>Submit(e)" />

View File

@ -1,7 +1,7 @@
<div>
<AntDesign.InputNumber DefaultValue="3" Disabled="@disabled" @bind-Value="myValue" />
<div style="margin: 20px 0px 20px 0px;">
<AntButton Type="@AntButtonType.Primary" OnClick="(e)=> ToggleDisable()">Toggle disabled</AntButton>
<Button Type="@ButtonType.Primary" OnClick="(e)=> ToggleDisable()">Toggle disabled</Button>
</div>
</div>

View File

@ -11,7 +11,7 @@
@code{
RenderFragment avatar = @<AntAvatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"></AntAvatar>;
RenderFragment avatar = @<Avatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"></Avatar>;
public class BasicItem
{

View File

@ -13,7 +13,7 @@
@if (!InitLoading && !Loading)
{
<div class="demo-loadmore-btn-content ">
<AntButton OnClick="OnLoadMore">loading more</AntButton>
<Button OnClick="OnLoadMore">loading more</Button>
</div>
}
</LoadMore>
@ -35,7 +35,7 @@
@code {
RenderFragment avatar = @<AntAvatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"></AntAvatar>;
RenderFragment avatar = @<Avatar Src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"></Avatar>;
public int count = 3;

View File

@ -1,5 +1,5 @@
<div style="width: 256;">
<AntButton Type="primary" OnClick="ToggleCollapsed" Style="margin-bottom: 16px">
<Button Type="primary" OnClick="ToggleCollapsed" Style="margin-bottom: 16px">
@if (collapsed)
{
<AntIcon Type="menu-unfold" Theme="outline"></AntIcon>
@ -8,7 +8,7 @@
{
<AntIcon Type="menu-fold" Theme="outline"></AntIcon>
}
</AntButton>
</Button>
<Menu
DefaultSelectedKeys=@(new[]{"1"})
DefaultOpenKeys=@(new[]{"sub1"})

View File

@ -1,8 +1,8 @@
@inject MessageService _message
<AntButton Type="default" OnClick="OnClick">
<Button Type="default" OnClick="OnClick">
Display normal message
</AntButton>
</Button>
@code{
private async Task OnClick()

View File

@ -1,8 +1,8 @@
@inject MessageService _message
<AntButton Type="default" OnClick="OnClick">
<Button Type="default" OnClick="OnClick">
Customized display duration
</AntButton>
</Button>
@code{
private void OnClick()

View File

@ -1,8 +1,8 @@
@inject MessageService _message
<AntButton Type="primary" OnClick="OnClick">
<Button Type="primary" OnClick="OnClick">
Display normal message
</AntButton>
</Button>
@code{
private void OnClick()

View File

@ -1,8 +1,8 @@
@inject MessageService _message
<AntButton Type="default" OnClick="OnClick">
<Button Type="default" OnClick="OnClick">
Display a loading indicator
</AntButton>
</Button>
@code{
private async Task OnClick()

View File

@ -2,19 +2,19 @@
<Space>
<SpaceItem>
<AntButton Type="default" OnClick="Success">
<Button Type="default" OnClick="Success">
Success
</AntButton>
</Button>
</SpaceItem>
<SpaceItem>
<AntButton Type="default" OnClick="Error">
<Button Type="default" OnClick="Error">
Error
</AntButton>
</Button>
</SpaceItem>
<SpaceItem>
<AntButton Type="default" OnClick="Warning">
<Button Type="default" OnClick="Warning">
Warning
</AntButton>
</Button>
</SpaceItem>
</Space>

View File

@ -1,8 +1,8 @@
@inject MessageService _message
<AntButton Type="primary" OnClick="OnClick">
<Button Type="primary" OnClick="OnClick">
Display normal message
</AntButton>
</Button>
@code{
private async Task OnClick()

View File

@ -1,8 +1,8 @@
@inject NotificationService _notice
<AntButton Type="@AntButtonType.Primary" OnClick="@OnClick">
<Button Type="@ButtonType.Primary" OnClick="@OnClick">
Open the notification box
</AntButton>
</Button>
@code{
private async Task OnClick()

View File

@ -1,8 +1,8 @@
@inject NotificationService _notice
<AntButton Type="@AntButtonType.Primary" OnClick="@OnClick">
<Button Type="@ButtonType.Primary" OnClick="@OnClick">
Open the notification box
</AntButton>
</Button>
@code{

View File

@ -1,8 +1,8 @@
@inject NotificationService _notice
<AntButton Type="@AntButtonType.Primary" OnClick="@OnClick">
<Button Type="@ButtonType.Primary" OnClick="@OnClick">
Open the notification box
</AntButton>
</Button>
@code{
private async Task OnClick()

View File

@ -1,29 +1,29 @@
@inject NotificationService _notice
<div>
<AntButton Type="@AntButtonType.Primary" OnClick="@OnTopLeftClick">
<Button Type="@ButtonType.Primary" OnClick="@OnTopLeftClick">
<AntIcon Type="Radius-Upleft" Theme="Outline"></AntIcon>
TopLeft
</AntButton>
</Button>
<AntButton Type="@AntButtonType.Primary" OnClick="@OnTopRightClick">
<Button Type="@ButtonType.Primary" OnClick="@OnTopRightClick">
<AntIcon Type="Radius-Upright" Theme="Outline"></AntIcon>
TopRight
</AntButton>
</Button>
</div>
<br/>
<div>
<AntButton Type="@AntButtonType.Primary" OnClick="@OnBottomLeftClick">
<Button Type="@ButtonType.Primary" OnClick="@OnBottomLeftClick">
<AntIcon Type="Radius-Bottomleft" Theme="Outline"></AntIcon>
BottomLeft
</AntButton>
</Button>
<AntButton Type="@AntButtonType.Primary" OnClick="@OnBottomRightClick">
<Button Type="@ButtonType.Primary" OnClick="@OnBottomRightClick">
<AntIcon Type="Radius-Bottomright" Theme="Outline"></AntIcon>
BottomRight
</AntButton>
</Button>
</div>
@code {

View File

@ -1,8 +1,8 @@
@inject NotificationService _notice
<AntButton Type="@AntButtonType.Primary" OnClick="@OnClick">
<Button Type="@ButtonType.Primary" OnClick="@OnClick">
Open the notification box
</AntButton>
</Button>
@code{
private async Task OnClick()

View File

@ -1,17 +1,17 @@
@inject NotificationService _notice
<AntButton Type="@AntButtonType.Primary" OnClick="@OnClick">
<Button Type="@ButtonType.Primary" OnClick="@OnClick">
custom button
</AntButton>
</Button>
@code{
private async Task OnClick()
{
string key = $"open{DateTime.Now}";
RenderFragment btn = @<AntButton Type="@AntButtonType.Primary" OnClick="() => { _notice.Close(key); }">
RenderFragment btn = @<Button Type="@ButtonType.Primary" OnClick="() => { _notice.Close(key); }">
confirm
</AntButton>;
</Button>;
await _notice.Open(new NotificationConfig()
{
Message = "Notification Title",

View File

@ -1,20 +1,20 @@
@inject NotificationService _notice
<AntButton OnClick="@OnSuccessClick">
<Button OnClick="@OnSuccessClick">
success
</AntButton>
</Button>
<AntButton OnClick="@OnInfoClick">
<Button OnClick="@OnInfoClick">
info
</AntButton>
</Button>
<AntButton OnClick="@OnWarningClick">
<Button OnClick="@OnWarningClick">
warning
</AntButton>
</Button>
<AntButton OnClick="@OnErrorClick">
<Button OnClick="@OnErrorClick">
error
</AntButton>
</Button>
@code{
private async Task NoticeWithIcon(NotificationType type)

View File

@ -1,9 +1,9 @@
<div>
<Progress Percent=_percent Type=ProgressType.Circle />
<AntButtonGroup>
<AntButton OnClick=Decline Icon=Minus />
<AntButton OnClick=Increase Icon=Plus />
</AntButtonGroup>
<ButtonGroup>
<Button OnClick=Decline Icon=Minus />
<Button OnClick=Increase Icon=Plus />
</ButtonGroup>
</div>
@code{

View File

@ -1,9 +1,9 @@
<div>
<Progress Percent=_percent/>
<AntButtonGroup>
<AntButton OnClick=Decline Icon=Minus />
<AntButton OnClick=Increase Icon=Plus />
</AntButtonGroup>
<ButtonGroup>
<Button OnClick=Decline Icon=Minus />
<Button OnClick=Increase Icon=Plus />
</ButtonGroup>
</div>
@code{

View File

@ -7,7 +7,7 @@
Disabled
</Radio>
<div style="margin-top: 20px">
<AntButton Type="primary" OnClick="_=>Disabled=!Disabled">Toggle Disabled</AntButton>
<Button Type="primary" OnClick="_=>Disabled=!Disabled">Toggle Disabled</Button>
</div>
</div>

View File

@ -6,5 +6,5 @@
@code
{
RenderFragment extra = @<AntButton Type="primary">Next</AntButton>;
RenderFragment extra = @<Button Type="primary">Next</Button>;
}

View File

@ -24,8 +24,8 @@
@code {
RenderFragment extra =
@<Template>
<AntButton Type="primary">Go Console</AntButton>
<AntButton>Buy Again</AntButton>
<Button Type="primary">Go Console</Button>
<Button>Buy Again</Button>
</Template>
;
}

View File

@ -5,8 +5,8 @@
@code {
RenderFragment extra =
@<AntButton Type="primary">
@<Button Type="primary">
Go Console
</AntButton>;
</Button>;
}

View File

@ -7,8 +7,8 @@
{
RenderFragment extra =
@<Template>
<AntButton Type="primary">Go Console</AntButton>
<AntButton>Buy Again</AntButton>
<Button Type="primary">Go Console</Button>
<Button>Buy Again</Button>
</Template>
;
}

View File

@ -3,5 +3,5 @@
Extra=extra />
@code
{
RenderFragment extra = @<AntButton Type="primary">Go Console</AntButton>;
RenderFragment extra = @<Button Type="primary">Go Console</Button>;
}

View File

@ -5,5 +5,5 @@
@code
{
RenderFragment extra = @<AntButton Type="primary">Back Home</AntButton>;
RenderFragment extra = @<Button Type="primary">Back Home</Button>;
}

View File

@ -5,5 +5,5 @@
@code
{
RenderFragment extra =@<AntButton Type="primary">Back Home</AntButton>;
RenderFragment extra =@<Button Type="primary">Back Home</Button>;
}

View File

@ -5,5 +5,5 @@
@code
{
RenderFragment extra =@<AntButton Type="primary">Back Home</AntButton>;
RenderFragment extra =@<Button Type="primary">Back Home</Button>;
}

Some files were not shown because too many files have changed in this diff Show More