It is always good to reuse code and with Blazor's components model it is simple. I have built a reuseable dialog built on top of the Blazored Modal.
I realized I used several of the same types of UI dialogs in my applications, Confirmation with OK/Cancel, confirmation with Yes/No, Warning confirmation and a single input type dialog. So I figure why not create a UI component that I can reuse for these. This is that projects.
-
Clone this repository
git clone https://github.com/CodingWithDavid/UICommonDialogs cd UICommonDialogs
-
Open in Visual Studio or Visual Code a. With Visual Code you will need to install the C# extensions
-
Press F5
- Blazored Modal
- Blazored Toast - used for visual feed back
- Index Page with buttons to launch the different common dialog modals
- Buttons component that handles the logic and UI for the Common dialogs
- [Chris Sainty's Blazored Modal] (https://chrissainty.com/blazored-modal-released/)
- VS Code
- Visual Studio