File tree Expand file tree Collapse file tree 3 files changed +21
-12
lines changed
src/BootstrapBlazor/Components/Input Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 44<div @attributes="AdditionalAttributes" id="@Id" class="@ClassString">
55 @for (var index = 0; index < Digits; index++)
66 {
7- @if(IsReadonly || IsDisabled)
8- {
9- <span class="@ItemClassString">
10- @GetValueString(index)
11- </span>
12- }
13- else
14- {
15- <input type="@TypeString" class="@InputClassString"
16- maxlength="@MaxLengthString" inputmode="@TypeModeString" placeholder="@PlaceHolder"
17- value="@GetValueString(index)" />
18- }
7+ @if(IsReadonly || IsDisabled)
8+ {
9+ <span class="@ItemClassString">
10+ @GetValueString(index)
11+ </span>
12+ }
13+ else
14+ {
15+ <input type="@TypeString" class="@InputClassString"
16+ maxlength="@MaxLengthString" inputmode="@TypeModeString" placeholder="@PlaceHolder"
17+ value="@GetValueString(index)" />
18+ }
1919 }
2020</div>
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public partial class OtpInput
4646
4747 private string? InputClassString => CssBuilder.Default("bb-opt-item")
4848 .AddClass("input-number-fix", Type == OtpInputType.Number)
49+ .AddClass(ValidCss)
4950 .Build();
5051
5152 private string TypeString => Type switch
Original file line number Diff line number Diff line change 3030 padding: 0;
3131 text-align: center;
3232 }
33+
34+ &.is-valid {
35+ --bs-border-color: var(--bs-success);
36+ }
37+
38+ &.is-invalid {
39+ --bs-border-color: var(--bs-danger);
40+ }
3341 }
3442
3543 span.bb-opt-item {
You can’t perform that action at this time.
0 commit comments