Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Anu6is authored Nov 11, 2024
1 parent 1f72c4a commit cc2d160
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,35 @@ The set of components and features may extend over time. Currently, StaticInput
</summary>

```html
<MudTextField @bind-Value="Password" Label="Password" Variant="Variant.Outlined" InputType="InputType.Password"
Adornment="Adornment.End" AdornmentIcon="@PasswordInputIcon"/>
<MudStaticTextField @bind-Value="@Password"
InputType="InputType.Password"
Adornment="Adornment.End"
AdornmentIcon="@Icons.Material.Outlined.VisibilityOff"
AdornmentClickFunction="showPassword" />
```
```cs
@code {
public string Password { get; set; }
}
```
```js
<script>
let timeoutId;

function showPassword(inputElement, button) {
if (inputElement.type === 'password') {
inputElement.type = 'text';
clearTimeout(timeoutId);
timeoutId = setTimeout(function () {
inputElement.type = 'password';
}, 5000);
} else {
inputElement.type = 'password';
clearTimeout(timeoutId);
}
}
</script>
```
</details>


Expand Down

0 comments on commit cc2d160

Please sign in to comment.