-
-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added possibility to define custom close icon #121
Conversation
Thanks for creating this PR @linkdotnet. However, it doesn't address the issue you've linked, at least not fully. That issue requires the ability to customise and hide the close icon. You have only implemented customising it. Could you complete the additional work or remove the link to the issue as someone else will have to finished it. |
I guess I can do the additional work later. That shouldn't be a problem |
Added the option to hide the button. The default is, that the button is visible (as it was until now). |
This is great, thanks @linkdotnet. I have just one more request. Can you add an example to the sample add and any relevant information to the readme. Once that is done I'll get this merged. |
Can do so @chrissainty. BTW: You wouldn't necessarily need a "hide close button" feature as you can just set the RenderFragment for the CloseButton to empty. But I guess an explicit parameter might be better. |
That's true, but I don't think it's as nicer API to work with verses setting a explicit parameter. |
I changed the server sample to show how to use the Custom Icon with a469700 |
Thanks for this work @linkdotnet, and pologies for the delay in merging. |
Essentially closes #98
This will give the option to define a custom close button. The implementation still uses the current approach as default. Therefore a custom icon is completely optional.
Usage
The definition of the custom icon will be as
RenderFragment
for theBlazoredToasts
component.For Blazor server in _Host.cshtml / for Blazor Webassembly in MainLayout.razor:
Will become:
I also added
IsFixed
to the ParentComponent (BlazoredToasts
) as the child component (BlazoredToast
) is not relying on updates.