mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-27 13:48:51 +01:00
* a11y: silence miscellaneous icons that should not be read by screen reader (#5723, #5724) * 📝 chore: Update bug report template with additional guidance and version information * 📝 chore: Update bug report template to guide users on using Discussions for general inquiries and setup help --------- Co-authored-by: Danny Avila <danny@librechat.ai>
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import { MessageCircleDashed, X } from 'lucide-react';
|
|
import { useLocalize } from '~/hooks';
|
|
|
|
interface TemporaryChatProps {
|
|
isTemporaryChat: boolean;
|
|
setIsTemporaryChat: (value: boolean) => void;
|
|
}
|
|
|
|
export const TemporaryChat = ({ isTemporaryChat, setIsTemporaryChat }: TemporaryChatProps) => {
|
|
const localize = useLocalize();
|
|
|
|
if (!isTemporaryChat) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div className="divide-token-border-light m-1.5 flex flex-col divide-y overflow-hidden rounded-b-lg rounded-t-2xl bg-surface-secondary-alt">
|
|
<div className="flex items-start gap-4 py-2.5 pl-3 pr-1.5 text-sm">
|
|
<span className="mt-0 flex h-6 w-6 flex-shrink-0 items-center justify-center">
|
|
<div className="icon-md">
|
|
<MessageCircleDashed className="icon-md" aria-hidden="true" />
|
|
</div>
|
|
</span>
|
|
<span className="text-token-text-secondary line-clamp-3 flex-1 py-0.5 font-semibold">
|
|
{localize('com_ui_temporary_chat')}
|
|
</span>
|
|
<button
|
|
className="text-token-text-secondary flex-shrink-0"
|
|
type="button"
|
|
aria-label="Close temporary chat"
|
|
onClick={() => setIsTemporaryChat(false)}
|
|
>
|
|
<X className="pr-1" />
|
|
</button>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|