czroo
czroo

Reputation: 157

Why after i import React Bootstrap my previous button design not work?

After i import 'bootstrap/dist/css/bootstrap.min.css';at App.js my previous design for button is not work like color and size.
I had create a button.js and button.css for the button design.
and use import { Button } from './Button'; to link it.
I am using {button && <Button buttonStyle='btn--outline'>register</Button>} to use the button

Upvotes: 0

Views: 76

Answers (1)

MB_
MB_

Reputation: 1747

If your component is called Button and the react-bootstrap component is also called Button, there is a conflict.

Change the name of your component (CustomButton for example)

Check this page and my demo : How do I use custom Button and Bootstrap Button In a React App for Different Pages?

Upvotes: 1

Related Questions