UNPKG

yrd-ui

Version:

npx create-react-app --template typescript yrd-ui

22 lines (21 loc) 853 B
import React from "react"; import { FontAwesomeIconProps } from "@fortawesome/react-fontawesome"; export type ThemeProps = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'light' | 'dark'; export interface IconProps extends FontAwesomeIconProps { /** 支持框架主题 根据主题显示不同的颜色 */ theme?: ThemeProps; } /** * 提供了一套常用的图标集合 基于 react-fontawesome。 * * 支持 react-fontawesome的所有属性 可以在这里查询 https://github.com/FortAwesome/react-fontawesome#basic * * 支持 fontawesome 所有 free-solid-icons,可以在这里查看所有图标 https://fontawesome.com/icons?d=gallery&s=solid&m=free * ### 引用方法 * * ~~~js * import { Icon } from 'yrd-ui' * ~~~ */ declare const Icon: React.FC<IconProps>; export default Icon;