import React, { useMemo } from 'react';
import '../g.scss';
function BorderImg(props: IBorderImg) {
const {
value='',
imgList=[],
change,
wrapStyle = { padding: '6px 20px 6px 20px' }
} = props;
const Redio = useMemo(() => {
return (
{Array.isArray(imgList) &&
imgList?.length > 0 &&
imgList.map((item) => {
if (item?.type === 'large') {
return (
{
change?.(item?.key);
}}
key={item?.key}
>
);
} else {
return (
{
change?.(item?.key);
}}
>
);
}
})}
);
}, [value, imgList]);
return Redio;
}
export default BorderImg;
export interface IBorderImg {
value?: string;
imgList: IImgList[];
change?: Function;
wrapStyle?: React.CSSProperties;
}
export interface IImgList {
key: string;
type?: string;
imgUrl?: string;
}