mirror of
https://github.com/MrXujiang/h5-Dooring.git
synced 2025-12-12 18:22:51 +00:00
21 lines
515 B
JavaScript
21 lines
515 B
JavaScript
import { memo } from 'react';
|
|
import * as Icon from '@ant-design/icons';
|
|
import IconImg from 'assets/icon.png';
|
|
|
|
const XIcon = memo(props => {
|
|
const { color, size, type, spin, isTpl } = props;
|
|
|
|
const MyIcon = Icon[type];
|
|
|
|
return isTpl ? (
|
|
<div style={{ textAlign: 'center' }}>
|
|
<img style={{ verticalAlign: '-20px', width: '82px' }} src={IconImg} alt={type} />
|
|
图标
|
|
</div>
|
|
) : (
|
|
<MyIcon twoToneColor={color} style={{ fontSize: size }} spin={spin} />
|
|
);
|
|
});
|
|
|
|
export default XIcon;
|