mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
1bdece0ea8
* feat(module: modal): add Modal locale * feat(module: confirm): locale support for zh-cn, en-us * docs: add the demo of override locale's custom text * feat: locale's json files add confirm configuration * fix: custom ButtonProps override Button[1,2,3]Text or OK(Cancel)Text * docs: using InvokeAsync to invoke StateHasChanged * docs(module: modal): add override locale de
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
using OneOf;
|
|
|
|
namespace AntDesign
|
|
{
|
|
/// <summary>
|
|
/// button props
|
|
/// </summary>
|
|
public class ButtonProps
|
|
{
|
|
public bool Block { get; set; } = false;
|
|
|
|
public bool Ghost { get; set; } = false;
|
|
|
|
public bool Search { 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; }
|
|
|
|
private bool? _danger;
|
|
public bool? Danger { get => _danger; set => _danger = value; }
|
|
|
|
internal bool IsDanger
|
|
{
|
|
get
|
|
{
|
|
if (Danger.HasValue) return Danger.Value;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
public OneOf<string, RenderFragment>? ChildContent { get; set; } = null;
|
|
}
|
|
}
|