I am using ant design Button
and setting the icon but the icon is not displayed in center inside button.
import "antd/dist/antd.css";
import { DeleteOutlined } from "@ant-design/icons";
<Row>
<Col span={2} style={{ padding: "5px" }} >
<Button
type="primary"
size="middle"
shape="circle"
danger
icon={<DeleteOutlined />}
onClick={() => deleteSkid(index)}
/>
</Col>
</Row>
I also tried like this but there's no change.
<Row>
<Col span={2} style={{ padding: "5px" }} >
<Button
type="primary"
size="middle"
shape="circle"
danger
onClick={() => deleteSkid(index)}
>
<DeleteOutlined />
</Button>
</Col>
</Row>
Are you using bootstrap or tailwind CSS? Try adding this:
svg { vertical-align: baseline; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With