import { Typography } from "@/components/ui";

import styles from "./MessageMeta.module.scss";

interface MessageMetaProps {
  time: string | null;
  children?: React.ReactNode;
}

export default function MessageMeta({ time, children }: MessageMetaProps) {
  return (
    <div className={styles.meta}>
      {time && (
        <Typography size="xs" color="secondary">
          {time}
        </Typography>
      )}
      {children}
    </div>
  );
}
