8 lines
886 B
JavaScript
8 lines
886 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
export const Message = ({ text, isOwn = false, timestamp, status = 'sent' }) => {
|
|
return (_jsx("div", { className: `flex ${isOwn ? 'justify-end' : 'justify-start'} mb-4`, children: _jsxs("div", { className: `max-w-xs lg:max-w-md px-4 py-2 rounded-2xl ${isOwn
|
|
? 'bg-maya-primary text-white rounded-br-none'
|
|
: 'bg-maya-accent text-gray-800 rounded-bl-none'}`, children: [_jsx("p", { className: "text-sm", children: text }), _jsxs("div", { className: `flex items-center justify-end space-x-1 mt-1 ${isOwn ? 'text-red-100' : 'text-gray-500'}`, children: [_jsx("span", { className: "text-xs", children: timestamp }), isOwn && (_jsx("span", { className: "text-xs", children: status === 'read' ? '✓✓' : status === 'delivered' ? '✓✓' : '✓' }))] })] }) }));
|
|
};
|
|
export default Message;
|