NgbModalOptions size option should not be typed to ‘sm’ or ‘lg’

Bug 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

3 thoughts on “NgbModalOptions size option should not be typed to ‘sm’ or ‘lg’

  1. 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.