import { type FC, type ReactNode } from "react";

type Props = {
  text?: string | number | ReactNode;
  children?: ReactNode;
  dir?: string;
  className?: string;
};

const Td: FC<Props> = ({ text, children, dir, className }) => {
  return (
    <td
      className={`px-3 md:px-6 py-3 md:py-4 whitespace-nowrap text-xs ${className || ""}`}
      style={{ direction: dir === "ltr" ? "ltr" : "rtl" }}
    >
      {text ?? children}
    </td>
  );
};

export default Td;
