chanan / BlazorStrap

Bootstrap 4 Components for Blazor Framework
https://blazorstrap.io
The Unlicense
920 stars 157 forks source link

BSModal - CSS-Class for Content #578

Closed EMaderbacher closed 1 year ago

EMaderbacher commented 1 year ago

I can specify for almost everything an additional CSS class but not for the but not for the Body itself:

protected override string? ContentClassBuilder => new CssBuilder("modal-content")
                .AddClass($"bg-{ModalColor.NameToLower()}", ModalColor != BSColor.Default)
                .Build().ToNullString();

Is it possible to add therefore an additional parameter? When it's ok, I can provide a pull request. How shall this parameter be named?

jbomhold3 commented 1 year ago

Yeah if you want to submit the pr will review it and get it in. Please make sure you add it both to V4 and V5

EMaderbacher commented 1 year ago

How shall I Name that property? Unfortunately ContentClass is used already for Body

jbomhold3 commented 1 year ago

Let's see the wrapper is just Class The dialog is DisalogClass Body class used ContentClass opps

Content without a body is missing a Parameter ModelContextClass probably will be best since I goofed on the body class naming.

jbomhold3 commented 1 year ago

I see why I did it but should have did it differently don't want to do a breaking change to fix it however probably add BodyClass and update the getter and setter for contextclass to set and read from the body class [Parameter] public string? BodyClass { get; set; } [Obsolete("ContentClass is deprecated, please use BodyClass instead.")] [Parameter]public string? ContentClass { get => BodyClass set {BodyClasss = value;} }