File size: 1,153 Bytes
f0743f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | import { TooltipAnchor } from '@librechat/client';
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-1.5 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>
);
}
|