import React, { useEffect, useMemo, useState } from 'react'; import Wrap from '../wrap/Wrap'; import Icon from '../../Icon/index'; import { Tooltip } from 'antd'; import '../g.scss'; function Icons(props: IIcons) { const { change, wrapStyle = { padding: '6px 20px 6px 20px' }, alignList } = props; const Dom = useMemo(() => { return (
{Array.isArray(alignList) && alignList.length > 0 && alignList.map((item, index) => { return (
{ change?.(item?.key); }} > {index === 2 ? (
) : ( <> )}
); })}
); }, [alignList]); return Dom; } export default Icons; export interface IIcons { alignList?: IFontLine[]; change?: Function; wrapStyle?: React.CSSProperties; } export interface IFontLine { key: string; icon: string; title: string; }