import clsx from "clsx"; import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Logo from "@theme/Logo"; import styles from "./styles.module.css"; export type Message = { position?: "left" | "right"; msg: string; }; function MessageBox({ msg, isRight, }: { msg: string; isRight: boolean; }): JSX.Element { return (
{isRight ? (
) : (
)}
").replace(/ /g, " "), }} >
); } export default function Messenger({ msgs = [], }: { msgs?: Message[]; }): JSX.Element { const isRight = (msg: Message): boolean => msg.position === "right"; return (
NoneBot
{msgs.map((msg, i) => ( ))}
); }