Exemple #1
0
 public static string GetValue(this BitButtonType bitButtonType)
 {
     return(bitButtonType switch
     {
         BitButtonType.Button => "button",
         BitButtonType.Submit => "submit",
         BitButtonType.Reset => "reset",
         _ => string.Empty,
     });
Exemple #2
0
    public void BitIconButtonTypeOfButtonTest(BitButtonType buttonType)
    {
        var component = RenderComponent <BitIconButton>(parameters =>
        {
            parameters.Add(p => p.ButtonType, buttonType);
        });

        var bitIconButton = component.Find(".bit-ico-btn");

        var buttonTypeName = buttonType == BitButtonType.Button ? "button" : buttonType == BitButtonType.Submit ? "submit" : "reset";

        Assert.AreEqual(bitIconButton.GetAttribute("type"), buttonTypeName);
    }