-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
139 additions
and
10 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
5 changes: 5 additions & 0 deletions
5
BlazorBootstrap.Demo.RCL/Pages/Buttons/Button_Demo_04_Sizes_C.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,5 @@ | ||
<Button Color="ButtonColor.Primary" Size="Size.ExtraLarge"> Extra large button </Button> | ||
<Button Color="ButtonColor.Secondary" Size="Size.Large"> Large button </Button> | ||
<Button Color="ButtonColor.Success" Size="Size.Medium"> Medium button </Button> | ||
<Button Color="ButtonColor.Danger" Size="Size.Small"> Small button </Button> | ||
<Button Color="ButtonColor.Warning" Size="Size.ExtraSmall"> Extra small button </Button> |
65 changes: 57 additions & 8 deletions
65
BlazorBootstrap.Demo.RCL/Pages/Buttons/Button_Demo_08_Show_Hide_Loading_Spinner.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 |
---|---|---|
@@ -1,14 +1,63 @@ | ||
<Button @ref="saveButton" Color="ButtonColor.Primary" @onclick="async () => await OnSaveClick()">Save</Button> | ||
|
||
<Button @ref="saveButton1" Color="ButtonColor.Primary" Size="Size.ExtraLarge" @onclick="OnSave1Click"> | ||
<Icon Name="IconName.Activity"></Icon> | ||
</Button> | ||
<Button @ref="saveButton2" Color="ButtonColor.Primary" Size="Size.Large" @onclick="OnSave2Click"> | ||
<Icon Name="IconName.Activity"></Icon> | ||
</Button> | ||
<Button @ref="saveButton3" Color="ButtonColor.Primary" Size="Size.Medium" @onclick="OnSave3Click"> | ||
<Icon Name="IconName.Activity"></Icon> | ||
</Button> | ||
<Button @ref="saveButton4" Color="ButtonColor.Primary" Size="Size.Small" @onclick="OnSave4Click"> | ||
<Icon Name="IconName.Activity"></Icon> | ||
</Button> | ||
<Button @ref="saveButton5" Color="ButtonColor.Primary" Size="Size.ExtraSmall" @onclick="OnSave5Click"> | ||
<Icon Name="IconName.Activity"></Icon> | ||
</Button> | ||
@code { | ||
private Button saveButton; | ||
private Button saveButton1, saveButton2, saveButton3, saveButton4, saveButton5; | ||
|
||
private async Task OnSave1Click() | ||
{ | ||
saveButton1?.ShowLoading("Loading..."); | ||
|
||
await Task.Delay(3000); // API call | ||
saveButton1?.HideLoading(); | ||
} | ||
|
||
private async Task OnSave2Click() | ||
{ | ||
saveButton2?.ShowLoading("Loading..."); | ||
|
||
await Task.Delay(3000); // API call | ||
saveButton2?.HideLoading(); | ||
} | ||
|
||
private async Task OnSave3Click() | ||
{ | ||
saveButton3?.ShowLoading("Loading..."); | ||
|
||
await Task.Delay(3000); // API call | ||
saveButton3?.HideLoading(); | ||
} | ||
|
||
private async Task OnSave4Click() | ||
{ | ||
saveButton4?.ShowLoading("Loading..."); | ||
|
||
await Task.Delay(3000); // API call | ||
saveButton4?.HideLoading(); | ||
} | ||
|
||
private async Task OnSaveClick() | ||
private async Task OnSave5Click() | ||
{ | ||
saveButton?.ShowLoading("Saving details..."); | ||
saveButton5?.ShowLoading("Loading..."); | ||
|
||
await Task.Delay(5000); // API call | ||
await Task.Delay(3000); // API call | ||
saveButton?.HideLoading(); | ||
saveButton5?.HideLoading(); | ||
} | ||
} | ||
} |
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