project/front-end
ant-design icon, button 사용
정밀림
2020. 9. 24. 15:32
ant.design/components/icon/#components-icon-demo-iconfont
Icon - Ant Design
Import icons from @ant-design/icons, component name of icons with different theme is the icon name suffixed by the theme name. Specific the spin property to show spinning animation.
ant.design
위 주소가 ant design 공식 주소인듯?!
1. 패키지 설치
나와있는대로 터미널에서 다운을 받아줌
npm install --save @ant-design/icons
2. icon
icon 사용은 매우 간단. 내가 사용하고 싶은 icon 이름을 X라고 했다.
사이트에서 사용하고 싶은 아이콘 누르면 이름이 저절로 복사됨
import { X } from '@ant-design/icons';
< X />
3. button
버튼 모양이나 용도같은 API는 사이트에 잘 나와있음!
npm install antd
import { Button } from 'antd';
<Button type = "primary">버튼</Button>