-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20690ac
commit ea20538
Showing
4 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
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
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,29 @@ | ||
<div class="relative flex flex-col rounded-full | ||
text-on-surface"> | ||
<input type="text" | ||
id="@ControlId" | ||
class=" | ||
form-control | ||
rounded-full | ||
bg-surface-container-high px-12 py-4 | ||
placeholder-on-surface-variant | ||
focus:outline-none focus:border-none" | ||
placeholder="Search" | ||
@bind="SearchTerm" | ||
@oninput="e=>OnSearch.InvokeAsync(e.Value as string)" > | ||
</input> | ||
<md-icon class="absolute top-4 left-4">search</md-icon> | ||
<IconButton OnClick=@(e=>OnSearch.InvokeAsync("")) Type="IconButtonType.Standard" Icon="close" class="absolute top-2 right-2"/> | ||
<md-ripple></md-ripple> | ||
<md-focus-ring for="@ControlId"></md-focus-ring> | ||
</div> | ||
|
||
@code { | ||
private string ControlId = "a"+Guid.NewGuid().ToString().Replace("-", ""); | ||
|
||
[Parameter] | ||
public string SearchTerm { get; set; } = ""; | ||
|
||
[Parameter] | ||
public EventCallback<string> OnSearch { get; set; } | ||
} |
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