
import useNewToken from '@/Hook/useNewToken'
import { Image, ImageProps } from 'antd'
import style from './index.less'

interface NewImgProps extends ImageProps{
    imgStyle?:React.CSSProperties
}
/**
 * 消息图片
 * @returns 
 */
const ImgNews: React.FC<NewImgProps> = ({ preview = false,imgStyle, ...data }) => {

    /*****************************/
    const { token } = useNewToken()
    /*****************************/

    return <div className={style.imgNews} style={{ borderRadius: token.borderRadius }}>
        <Image preview={preview} {...data} className={style.img} style={imgStyle}/>
    </div>
}

export default ImgNews