blazorbootstrap
blazorbootstrap copied to clipboard
ConfirmDialog: Add possibility to change button classes
Currently the classes
me-md-2 px-4
gets appended to the No button and px-4
is getting appended to the Yes button. There is no way to configure this classes.
Please make them override able.
Can't we just add a unique className to each of the buttons? Through this we can override any specific tag through both the classes.
@shashank-23002 I would use the a parameter/option for this. The main benefit here is that you can apply already existing classes to the buttons. For example lets say I just want px-2
there. So I don't need to overwrite any logic with this and figure out the numbers/color by myself.
In addition when using a unique className you have the downfall of it being hard to change for each indiviual component. You can set it globally within the CSS file or you'll need to do it for every razor component and override the rules with the ::deep
syntax.
So I think adding two properties to the options would be a great choice. Or even better, make it equally configurable as the Modal
component. Why do I'll need to pass an options object to a ConfirmDialog
and on a Modal
I can define everything on the component itself?
@MarvinKlein1508 Can you share a sample screenshot of this issue with sample code for better understanding?
I'm talking about this two buttons.
Line 40 of ConfirmDialog.razor there us hardcoded padding and margin.
You can see what I mean when you look at the dialog on PC.