/**
 * @description 请添加OrderCell组件的描述和注释!!!
 *
 * @date 创建时间 2022-10-25 20:58
 * @author 开发人员 yena.he
 */

import React, { ReactNode } from "react";
import clsx from "clsx";

export interface OrderDetailItem {
  label: string;
  value: string | ReactNode;
  unit?: string;
  classes?: { label?: string; value?: string };
}

const OrderCell: React.FC<OrderDetailItem> = props => {
  const { label, value, classes, unit } = props;

  return (
    <li className={"nts-order-detail-item"}>
      <label className={clsx("nts-order-detail-label", classes?.label)}>{label ?? ""}</label>
      <div className={clsx("nts-order-detail-value", classes?.value)}>
        {value ?? ""} {unit ?? ""}
      </div>
    </li>
  );
};

export default OrderCell;
