import React from 'react'; import { Icon, ICON_LIST } from '../../../src'; import { ApiTable, ApiRow, sectionStyle, sectionTitleStyle, tagStyle, CodeBlock, labelStyle } from '../../tools'; const ICON_API: ApiRow[] = [ { prop: 'name', desc: '图标名称', type: 'IconName', defaultVal: '-', required: true, }, { prop: 'size', desc: '图标尺寸', type: 'number | string', defaultVal: '24', }, { prop: 'bounce', desc: '弹跳动画', type: 'boolean', defaultVal: 'false', }, { prop: 'className', desc: '自定义类名', type: 'string', defaultVal: '-', }, { prop: 'style', desc: '自定义样式', type: 'CSSProperties', defaultVal: '-', }, ]; const IconDemo: React.FC = () => (
Icon 10 icons
基础用法
size 尺寸
bounce 弹跳动画(鼠标悬停查看效果)
图标列表
{ICON_LIST.map((icon, index) => (
{icon.label} {icon.name}
))}
{ return (
{/* 基础用法 */} {/* 弹跳动画 */}
); }; export default App;`} />
); export default IconDemo;