vitalii-andriiovskyi / ngx-owl-carousel-o

owl-carousel for Angular >=6
MIT License
177 stars 51 forks source link

Add the option to have custom css class as param #227

Open yelhouti opened 2 years ago

yelhouti commented 2 years ago

Some purchased themes cam directly with styles like this:

.owl-carousel.nav-style-2 .owl-nav .owl-next {
    transform: rotate(180deg)!important;
    transform-origin: 15px 8px;
}

It would be great to have the option add nav-style-2 like this:

<owl-carousel-o styleClass="nav-style-2 mb-0"

And have these used inside with something like:

<div [class]="styleClass" #owlCarousel
      [ngClass]="{
                  'owl-carousel': true,
                  'owl-theme': true, 
                  'owl-rtl': owlDOMData?.rtl,
                  'owl-loaded': owlDOMData?.isLoaded,
                  'owl-responsive': owlDOMData?.isResponsive,
                  'owl-drag': owlDOMData?.isMouseDragable,
                  'owl-grab': owlDOMData?.isGrab}"