import React from 'react';
import styles from './index.less';
import { InputProps } from '../detailInterface';

export default function Detail(props: InputProps) {
    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 '数据错误';
    }
}
