2021-06-14 00:33:26 +08:00
|
|
|
|
using Microsoft.AspNetCore.Components;
|
2020-08-22 09:24:55 +08:00
|
|
|
|
using OneOf;
|
2020-06-02 14:25:44 +08:00
|
|
|
|
|
|
|
|
|
namespace AntDesign
|
|
|
|
|
{
|
2020-12-29 23:34:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// button props
|
|
|
|
|
/// </summary>
|
2020-06-02 14:25:44 +08:00
|
|
|
|
public class ButtonProps
|
|
|
|
|
{
|
|
|
|
|
public bool Block { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
public bool Ghost { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
public bool Loading { get; set; } = false;
|
|
|
|
|
|
|
|
|
|
public string Type { get; set; } = ButtonType.Default;
|
|
|
|
|
|
|
|
|
|
public string Shape { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
public string Size { get; set; } = AntSizeLDSType.Default;
|
|
|
|
|
|
|
|
|
|
public string Icon { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool Disabled { get; set; }
|
|
|
|
|
|
2020-08-22 09:24:55 +08:00
|
|
|
|
private bool? _danger;
|
|
|
|
|
public bool? Danger { get => _danger; set => _danger = value; }
|
|
|
|
|
|
|
|
|
|
internal bool IsDanger
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (Danger.HasValue) return Danger.Value;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-12-29 23:34:18 +08:00
|
|
|
|
public OneOf<string, RenderFragment>? ChildContent { get; set; } = null;
|
2020-06-02 14:25:44 +08:00
|
|
|
|
}
|
|
|
|
|
}
|