blazorbootstrap icon indicating copy to clipboard operation
blazorbootstrap copied to clipboard

ConfirmDialog: Add possibility to change button classes

Open MarvinKlein1508 opened this issue 1 year ago • 6 comments

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.

MarvinKlein1508 avatar May 24 '23 14:05 MarvinKlein1508

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 avatar May 24 '23 19:05 shashank-23002

@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 avatar May 26 '23 14:05 MarvinKlein1508

@MarvinKlein1508 Can you share a sample screenshot of this issue with sample code for better understanding?

gvreddy04 avatar Sep 15 '23 17:09 gvreddy04

I'm talking about this two buttons.

image

MarvinKlein1508 avatar Sep 15 '23 18:09 MarvinKlein1508

Line 40 of ConfirmDialog.razor there us hardcoded padding and margin.

MarvinKlein1508 avatar Sep 15 '23 18:09 MarvinKlein1508

You can see what I mean when you look at the dialog on PC. grafik

MarvinKlein1508 avatar Sep 15 '23 18:09 MarvinKlein1508