import React from 'react';
import styles from './index.less';
import {BaseComponentProps} from '@/apollo-table/component/interface';

export default function Detail(props:BaseComponentProps) {
    const value = props.formatter ? props.formatter(props.value) : props.value;
    if (!value) {
        return null;
    }
    if (typeof value === 'string') {
        return <div className={styles.text}>{value}</div>;
    } else {
        return '数据错误';
    }
}
