NgbModalOptions size option should not be typed to 'sm' or 'lg'
See original GitHub issueBug description:
Currently the size property on the NgbModalOptions interface is strongly typed to accept only ‘sm’ or ‘lg’.
I understand that these 2 options are the defaults in bootstrap but using bootstrap sass mixins like the following, custom sizes can be created.
@include media-breakpoint-up(xl) {
.modal-xl { max-width: $modal-xl; }
} // actually exists in bootstrap 4.2
@include media-breakpoint-up(xxl) {
.modal-xxl { max-width: $modal-xxl; }
}
I don’t see the benefit to strongly typing this particular option and think it should just be typed as string.
Versions of Angular, ng-bootstrap and Bootstrap:
Angular: 7.x
ng-bootstrap: 4.0.2
Bootstrap: 4.x
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
angular - ng-bootstrap Modal size - Stack Overflow
I just add the <any> tag which is a workaround until the size type became '"sm" | "lg" | "xl" | string'. –...
Read more >Modal - Angular powered Bootstrap
open(content: any, options: NgbModalOptions) => NgbModalRef ... size. Size of a new modal window. Type: 'sm' | 'lg' | 'xl' | string. windowClass....
Read more >how to setup the size of a modal - Material Design for Bootstrap
hello, how do i modifiy the size of a modal. the modal-lg is not large enough for my case. ideally i would like...
Read more >Angular 12 Bootstrap Modal Popup Example - Pass Data in ...
In this tutorial, we will install Ng Bootstrap in the Angular project and ... size : Modal window size can be set with...
Read more >Modal - Bootstrap
Modals are built with HTML, CSS, and JavaScript. · Clicking on the modal “backdrop” will automatically close the modal. · Bootstrap only supports...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Two examples:
I don’t see the point in adding the size variants plus string as string effectively creates a wildcard and removes any benefits of strictly typing this option.
Definitely need string added though as this package is falling behind the official bootstrap package.