Complete project

This commit is contained in:
2025-03-17 10:01:32 +04:00
parent bcc5d1daf4
commit 46c040c642
41 changed files with 1951 additions and 127 deletions

View File

@@ -0,0 +1,28 @@
import { IMessage } from "@/entities/message";
import { IUser } from "@/entities/user";
export const Message = ({
message,
color,
align = "right",
}: {
message: IMessage;
color: IUser["color"] | undefined;
align?: "left" | "right";
}) => {
return (
<div
key={message.id}
style={{
background: `var(--color-col${color})`,
borderRadius: `var(--radius-xl)`,
[align === "right"
? "borderBottomRightRadius"
: "borderBottomLeftRadius"]: 0,
}}
className={`max-w-20 p-2`}
>
{message.text}
</div>
);
};