|
1 | 1 | @page "/otp-input" |
2 | 2 | @inject IStringLocalizer<OtpInputs> Localizer |
3 | 3 |
|
| 4 | +<HeadContent> |
| 5 | + <style> |
| 6 | + .input-group-text { |
| 7 | + --bb-input-group-label-width: 100px; |
| 8 | + } |
| 9 | + </style> |
| 10 | +</HeadContent> |
| 11 | + |
4 | 12 | <h3>@Localizer["OtpInputsTitle"]</h3> |
5 | 13 |
|
6 | 14 | <h4>@Localizer["OtpInputsDescription"]</h4> |
|
9 | 17 | <p>@((MarkupString)Localizer["OtpInputsTips"].Value)</p> |
10 | 18 | </Tips> |
11 | 19 |
|
12 | | -<DemoBlock Title="@Localizer["OtpInputsNormalTitle"]" |
13 | | - Introduction="@Localizer["OtpInputsNormalIntro"]" |
14 | | - Name="Normal"> |
15 | | - <OtpInput Value="@_value"></OtpInput> |
16 | | -</DemoBlock> |
17 | | - |
18 | | -<DemoBlock Title="@Localizer["OtpInputsReadonlyTitle"]" |
19 | | - Introduction="@Localizer["OtpInputsReadonlyIntro"]" |
20 | | - Name="Readonly"> |
21 | | - <OtpInput Value="@_value" IsReadonly="true"></OtpInput> |
22 | | -</DemoBlock> |
23 | | - |
24 | | -<DemoBlock Title="@Localizer["OtpInputsDisabledTitle"]" |
25 | | - Introduction="@Localizer["OtpInputsDisabledIntro"]" |
26 | | - Name="Disabled"> |
27 | | - <OtpInput Value="@_value" IsDisabled="true"></OtpInput> |
28 | | -</DemoBlock> |
29 | | - |
30 | | -<DemoBlock Title="@Localizer["OtpInputsTypeTitle"]" |
31 | | - Introduction="@Localizer["OtpInputsTypeIntro"]" |
32 | | - Name="Type"> |
33 | | - <div class="row g-3"> |
34 | | - <div class="col-12"><Select @bind-Value="_otpInputType"></Select></div> |
35 | | - <div class="col-12"><OtpInput Value="@_value" Type="_otpInputType"></OtpInput></div> |
36 | | - </div> |
37 | | -</DemoBlock> |
38 | | - |
39 | 20 | <DemoBlock Title="@Localizer["OtpInputsTypeTitle"]" |
40 | 21 | Introduction="@Localizer["OtpInputsTypeIntro"]" |
41 | 22 | Name="Type"> |
42 | | - <div class="row g-3"> |
| 23 | + <div class="row g-3 mb-3"> |
43 | 24 | <div class="col-12 col-sm-6"> |
44 | 25 | <BootstrapInputGroup> |
45 | 26 | <BootstrapInputGroupLabel DisplayText="Type"></BootstrapInputGroupLabel> |
46 | 27 | <Select @bind-Value="_otpInputType"></Select> |
47 | 28 | </BootstrapInputGroup> |
48 | 29 | </div> |
49 | | - <div class="col-12"> |
| 30 | + <div class="col-12 col-sm-6"> |
| 31 | + <BootstrapInputGroup> |
| 32 | + <BootstrapInputGroupLabel DisplayText="PlaceHolder"></BootstrapInputGroupLabel> |
| 33 | + <BootstrapInput @bind-Value="@_placeHolder"></BootstrapInput> |
| 34 | + </BootstrapInputGroup> |
| 35 | + </div> |
| 36 | + <div class="col-12 col-sm-6"> |
| 37 | + <BootstrapInputGroup> |
| 38 | + <BootstrapInputGroupLabel DisplayText="Readonly"></BootstrapInputGroupLabel> |
| 39 | + <Switch @bind-Value="@_readonly"></Switch> |
| 40 | + </BootstrapInputGroup> |
| 41 | + </div> |
| 42 | + <div class="col-12 col-sm-6"> |
| 43 | + <BootstrapInputGroup> |
| 44 | + <BootstrapInputGroupLabel DisplayText="Disable"></BootstrapInputGroupLabel> |
| 45 | + <Switch @bind-Value="@_disabled"></Switch> |
| 46 | + </BootstrapInputGroup> |
50 | 47 | </div> |
51 | 48 | </div> |
52 | | - <OtpInput Value="@_value" Type="_otpInputType"></OtpInput> |
| 49 | + <OtpInput Value="@_value" Type="_otpInputType" PlaceHolder="@_placeHolder" IsReadonly="_readonly" IsDisabled="_disabled"></OtpInput> |
53 | 50 | </DemoBlock> |
0 commit comments