-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
4 changed files
with
41 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<a href="" | ||
onclick="var el = this; | ||
navigator.clipboard.writeText('@Value');" | ||
|
||
> | ||
|
||
<MudIcon Icon="@Icons.Material.Filled.ContentCopy" /> | ||
|
||
</a> | ||
|
||
@code { | ||
[Parameter] public string? Value { get; set; } | ||
|
||
//onclick description: | ||
//assign the anchor element to a variable since settimeout callback function loses the reference to "this" | ||
//add a class to give IU feedback to the user hidding the standard copy icon and showing a loader | ||
//write the value to clipboard. Due to IOS restrictions, Html native onclick event must be used instead of Blazor event. | ||
//add a delay in miliseconds with a callback function that removes the CSS class to hide the loader and display the standard copy icon again | ||
} |
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,15 @@ | ||
.StandBy { | ||
display: inline-block; | ||
} | ||
|
||
.Loader { | ||
display: none; | ||
} | ||
|
||
.Copying .StandBy { | ||
display: none; | ||
} | ||
|
||
.Copying .Loader { | ||
display: inline-block; | ||
} |
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