JulioWar / jw-bootstrap-switch-ng2

Bootstrap Switch for Angular 2+
https://juliowar.github.io/jw-bootstrap-switch-ng2/
MIT License
43 stars 14 forks source link

Styling issue in production build #35

Open AhmadDeel opened 3 years ago

AhmadDeel commented 3 years ago

Bug Report or Feature Request (mark with an x)

- [* ] bug report
- [ ] feature request

Versions.

The version of angular: 9.3.1 The version of this library: 2.0.5

the switch style sometimes is exactly like the presented but other times, especially in the build, is like the images bellow

Screenshot from 2020-11-28 22-17-41 Screenshot from 2020-11-28 22-17-44

AhmadDeel commented 3 years ago

I tried different values of switch-size, sometimes worked for me but others didn't. I could not get clean styles in any builds, development, or production!

AhmadDeel commented 3 years ago

HERE IS MY HTML

<bSwitch [(ngModel)]="switchStat.state" [switch-size]="switchStat.size" (changeState)="onChange($event)"></bSwitch>

AND MY TS CODE

switchStat: any = {
    offText: "Off",
    onText: "On",
    baseClass: "bootstrap-switch",
    size: "mini",
    animate: true,
    animated: false,
    disabled: false,
    readonly: false,
    indeterminate: false,
    inverse: true,
    color: "primary",
    offColor: "",
    labelText: "",
    state: true,
    value: true,
    inverseValue: false,
    handleWidth: "auto",
    labelWidth: "auto",
    offColorValue: false,
    offTextValue: false,
    wrapperClass: "bootstrap-switch",
  };