-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π fix(TextField): watch
Outlined
and Label
to update the width ofβ¦
β¦ label (#1138) * π fix(TextField): watch Outlined and Label to Update the width of label * π docs: use advance usage * improve
- Loading branch information
Showing
3 changed files
with
69 additions
and
14 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
docs/Masa.Blazor.Docs/Examples/components/text-fields/Usage/AdvanceUsage.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@namespace Masa.Blazor.Docs.Examples.components.text_fields | ||
|
||
<MTextField @bind-Value="_value" | ||
Label="Label" | ||
Filled="Filled" | ||
Solo="Solo" | ||
Outlined="Outlined" | ||
PrependIcon="@PrependIcon" | ||
Clearable="Clearable"> | ||
</MTextField> | ||
|
||
@code { | ||
|
||
[Parameter] | ||
public bool Filled { get; set; } | ||
|
||
[Parameter] | ||
public bool Solo { get; set; } | ||
|
||
[Parameter] | ||
public bool Outlined { get; set; } | ||
|
||
[Parameter] | ||
public string? PrependIcon { get; set; } | ||
|
||
[Parameter] | ||
public bool Clearable | ||
{ | ||
get => _clearable; | ||
set | ||
{ | ||
if (_clearable != value && value) | ||
{ | ||
_value ??= "Hover to Clear me"; | ||
} | ||
|
||
_clearable = value; | ||
} | ||
} | ||
|
||
private string? _value; | ||
private bool _clearable; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters