So when I'm using an Icon in Ant Design it is always 14 * 14 px. Is there a way to set the size maual?
Things like
<Icon width={"20px"} type="setting" />
or
<Icon style={{width: '20em'}} type="setting" />
do not work
Answer. Can change the size of the icon using fontSize style property.
The Ant-ICON Scientific Research Programme aims to answer fundamental science questions (as identified by the SCAR Horizon Scan and emerging issues), relating to the conservation and management of Antarctica and the Southern Ocean.
Import antd Now we install antd from yarn or npm. Modify src/App. js , import Button component from antd . import React from 'react'; import { Button } from 'antd'; import './App.
It should be
<Icon type="message" style={{ fontSize: '16px', color: '#08c' }} theme="outlined" />
https://codepen.io/anon/pen/wNgrWX
Can change the size of the icon using fontSize
style property.
eg: use of style={{ fontSize: '150%'}}
<PlayCircleFilled style={{ fontSize: '150%'}} />
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