index.tsx 428 Bytes
Newer Older
陈帅's avatar
陈帅 committed
1 2 3
import React from 'react';
import styles from './index.less';

陈帅's avatar
陈帅 committed
4
export interface FieldProps {
陈帅's avatar
陈帅 committed
5 6 7 8 9
  label: React.ReactNode;
  value: React.ReactNode;
  style?: React.CSSProperties;
}

陈帅's avatar
陈帅 committed
10
const Field: React.SFC<FieldProps> = ({ label, value, ...rest }) => (
陈帅's avatar
陈帅 committed
11 12 13 14 15 16 17
  <div className={styles.field} {...rest}>
    <span className={styles.label}>{label}</span>
    <span className={styles.number}>{value}</span>
  </div>
);

export default Field;