import LookPyq from '@/pages/weComTask/components/previewMsg/lookPyq';
import { Popover } from 'antd';
import React from 'react';

interface Props {
    data: any
    name?: React.ReactNode
}
const FriendsShowTable: React.FC<Props> = ({ name, data }) => {

    return <Popover
        placement="left"
        content={<LookPyq
            content={{ text: data?.text?.content, data: data?.attachmentList }}
        />}
        styles={{ body: { width: 360, overflow: 'hidden', overflowY: 'auto', maxHeight: 480 } }}
    >
        <div
            style={{
                backgroundColor: 'rgba(0,0,0,0.1)',
                padding: '4px 8px',
                borderRadius: 8,
                overflow: 'hidden',
                cursor: 'help'
            }}
        >{name || '朋友圈内容'}</div>
    </Popover>
};

export default React.memo(FriendsShowTable);