mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-25 20:58:50 +01:00
* 🎨 style: adjust padding and class names in UI components * 🎨 style: update ExportModal export button, update Export button hover style, refactor ChatForm style and fixed isRTL styles, update AttachFile position * 🎨 style: remove redundant border classes in SettingsTabs components for cleaner UI * 🎨 style: refactor Account component, extract DisplayUsernameMessages, and remove redundant border classes for cleaner layout * 🎨 style: conditionally render Dropdown in ForkSettings component for improved UI responsiveness * 🎨 style: replace DropdownNoState with Dropdown in voice selection components for consistency * 🎨 style: update Settings component layout for better responsivenes on large screens * 🎨 style: remove redundant margin-top classes for cleaner layout in various components
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { TooltipAnchor } from '~/components/ui';
|
|
import { useLocalize } from '~/hooks';
|
|
import { cn } from '~/utils';
|
|
|
|
export default function StopButton({ stop, setShowStopButton }) {
|
|
const localize = useLocalize();
|
|
|
|
return (
|
|
<TooltipAnchor
|
|
description={localize('com_nav_stop_generating')}
|
|
render={
|
|
<button
|
|
type="button"
|
|
className={cn(
|
|
'rounded-full bg-text-primary p-2 text-text-primary outline-offset-4 transition-all duration-200 disabled:cursor-not-allowed disabled:text-text-secondary disabled:opacity-10',
|
|
)}
|
|
aria-label={localize('com_nav_stop_generating')}
|
|
onClick={(e) => {
|
|
setShowStopButton(false);
|
|
stop(e);
|
|
}}
|
|
>
|
|
<svg
|
|
width="24"
|
|
height="24"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
className="icon-lg text-surface-primary"
|
|
>
|
|
<rect x="7" y="7" width="10" height="10" rx="1.25" fill="currentColor"></rect>
|
|
</svg>
|
|
</button>
|
|
}
|
|
></TooltipAnchor>
|
|
);
|
|
}
|