|
| 1 | +@page "/password-input" |
| 2 | + |
| 3 | +@attribute [Route(pageUrl)] |
| 4 | + |
| 5 | +<PageMetaTags PageUrl="@pageUrl" |
| 6 | + Title="@metaTitle" |
| 7 | + Description="@metaDescription" |
| 8 | + ImageUrl="@imageUrl" /> |
| 9 | + |
| 10 | +<PageHero Heading="@pageTitle"> |
| 11 | + <LeadSection>@pageDescription</LeadSection> |
| 12 | +</PageHero> |
| 13 | + |
| 14 | +<CarbonAds /> |
| 15 | + |
| 16 | +<Section Size="HeadingSize.H2" Name="Basic usage" PageUrl="@pageUrl" Link="basic-usage"> |
| 17 | + <Demo Type="typeof(PasswordInput_Demo_01_Basic_Usage)" Tabs="true" /> |
| 18 | +</Section> |
| 19 | + |
| 20 | +<Section Size="HeadingSize.H2" Name="Disable" PageUrl="@pageUrl" Link="disable"> |
| 21 | + <div class="mb-3">Use the <code>Disabled</code> parameter to disable the <code>TextInput</code>.</div> |
| 22 | + <Demo Type="typeof(PasswordInput_Demo_02_Disable_A)" Tabs="false" /> |
| 23 | + <div class="my-3">Also, use <b>Enable()</b> and <b>Disable()</b> methods to enable and disable the <code>TextInput</code>.</div> |
| 24 | + <Callout Color="CalloutColor.Warning" Heading="NOTE"> |
| 25 | + Do not use both the <b>Disabled</b> parameter and <b>Enable()</b> & <b>Disable()</b> methods. |
| 26 | + </Callout> |
| 27 | + <Demo Type="typeof(PasswordInput_Demo_02_Disable_B)" Tabs="false" /> |
| 28 | +</Section> |
| 29 | + |
| 30 | +<Section Size="HeadingSize.H2" Name="Valdations" PageUrl="@pageUrl" Link="validations"> |
| 31 | + <div class="mb-3"> |
| 32 | + Like any other blazor input component, <code>PasswordInput</code> supports validations. |
| 33 | + Add the DataAnnotations on the <code>PasswordInput</code> component to validate the user input before submitting the form. |
| 34 | + In the below example, we used <b>Required</b> attribute. |
| 35 | + </div> |
| 36 | + <Demo Type="typeof(PasswordInput_Demo_03_Validations)" Tabs="true" /> |
| 37 | +</Section> |
| 38 | + |
| 39 | +<Section Size="HeadingSize.H2" Name="Events: ValueChanged" PageUrl="@pageUrl" Link="events-value-changed"> |
| 40 | + <div class="mb-3">This event fires when the <code>PasswordInput</code> value changes, but not on every keystroke.</div> |
| 41 | + <Demo Type="typeof(PasswordInput_Demo_04_Events_ValueChanged)" Tabs="true" /> |
| 42 | +</Section> |
| 43 | + |
| 44 | +@code { |
| 45 | + private const string pageUrl = RouteConstants.Demos_PasswordInput_Documentation; |
| 46 | + private const string pageTitle = "Blazor PasswordInput"; |
| 47 | + private const string pageDescription = "The Blazor Bootstrap PasswordInput component is constructed using an HTML input of type 'password'."; |
| 48 | + private const string metaTitle = "Blazor PasswordInput Component"; |
| 49 | + private const string metaDescription = "The Blazor Bootstrap PasswordInput component is constructed using an HTML input of type 'password'."; |
| 50 | + private const string imageUrl = "https://i.imgur.com/1mVjqQv.png"; // TODO: Update image URL |
| 51 | +} |
0 commit comments