I installed ant design with npm
npm i --save antd
Then I used Button from their components like this
import { Button } from 'antd';
<Button type="primary" shape="circle">
hey
</Button>
The problem is that the button shape and type doesn't apply properly . How can I fix this issue ?
In your entry point (where you have the ReactDOM.render()
) add at the top of the file the following:
import 'antd/dist/antd.css';
Or if you're using create-react-app
, in your src/App.css
:
@import '~antd/dist/antd.css';
That will provide you the styling you need. Hope it helps!
Getting Started with Antd - Official Docs Usage with Create React App - Official Docs