diff --git a/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor b/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor index 85b6d56c..7b2555a7 100644 --- a/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor +++ b/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor @@ -19,43 +19,50 @@ ForId="@FieldId"> - + + + @if (CustomAdornment != null) + { + @CustomAdornment + } + else + { + + } + + + diff --git a/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor.cs b/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor.cs index 385bc87e..20cf2355 100644 --- a/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor.cs +++ b/CodeBeam.MudBlazor.Extensions/Components/PasswordField/MudPasswordField.razor.cs @@ -44,6 +44,11 @@ public partial class MudPasswordField : MudDebouncedInput /// [Parameter] public EventCallback OnClearButtonClick { get; set; } + /// + /// RenderFragment for end adornment. + /// + [Parameter] public RenderFragment CustomAdornment { get; set; } + public override ValueTask FocusAsync() { return InputReference.FocusAsync(); diff --git a/ComponentViewer.Docs/Pages/Examples/PasswordFieldExample1.razor b/ComponentViewer.Docs/Pages/Examples/PasswordFieldExample1.razor index 45b5fe86..59bdd852 100644 --- a/ComponentViewer.Docs/Pages/Examples/PasswordFieldExample1.razor +++ b/ComponentViewer.Docs/Pages/Examples/PasswordFieldExample1.razor @@ -1,11 +1,16 @@  - - - Password Mode + + + + + + Password Mode + @code{ string _password = "asdf"; bool _passwordMode; + Size _size = Size.Medium; }