Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the sample code in react triggers a style violation #15

Open
j4y opened this issue Dec 12, 2019 · 1 comment
Open

Using the sample code in react triggers a style violation #15

j4y opened this issue Dec 12, 2019 · 1 comment

Comments

@j4y
Copy link

j4y commented Dec 12, 2019

I used the code from the documentation:

<BootstrapSwitchButton
    checked={false}
    onlabel='Admin User'
    onstyle='danger'
    offlabel='Regular User'
    offstyle='success'
    style='w-100 mx-3'
    onChange={(checked: boolean) => {
        this.setState({ isUserAdmin: checked })
    }}
/>

And it produced a style violation:

./src/App.js
  Line 102:  Style prop value must be an object  react/style-prop-object
  Line 112:  Style prop value must be an object  react/style-prop-object
  Line 122:  Style prop value must be an object  react/style-prop-object
  Line 132:  Style prop value must be an object  react/style-prop-object
@vdusa
Copy link

vdusa commented Dec 14, 2021

Hello, I have the same react warning.
Does anyone has an advice, how to solve it, please?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants