LibreChat/client/src/components/Chat/Input/StopButton.tsx
Marco Beretta 4d4a6b53f1
🎨 style: UI Style Enhancements and Refactor for Improved Consistency and Layout (#4471)
* 🎨 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
2024-10-20 11:29:47 -04:00

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>
);
}