mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-21 19:00:13 +01:00
* refactor: optional attachment properties for `FileAttachment` * refactor: update ActionButton to use localized text * chore: localize text in DataTableFile, add missing translation, imports order, and linting * chore: linting in DataTable * fix: integrate Recoil state management for file deletion in DataTableFile * fix: integrate Recoil state management for file deletion in DataTable * fix: add temp_file_id to BatchFile type and update deleteFiles logic to properly remove files that are mapped to temp_file_id
22 lines
575 B
TypeScript
22 lines
575 B
TypeScript
import React from 'react';
|
|
import { Button } from '~/components/ui';
|
|
import { useLocalize } from '~/hooks';
|
|
|
|
type ActionButtonProps = {
|
|
onClick: () => void;
|
|
};
|
|
|
|
export default function ActionButton({ onClick }: ActionButtonProps) {
|
|
const localize = useLocalize();
|
|
return (
|
|
<div className="w-32">
|
|
<Button
|
|
className="w-full rounded-md border border-black bg-white p-0 text-black hover:bg-black hover:text-white"
|
|
onClick={onClick}
|
|
>
|
|
{/* Action Button */}
|
|
{localize('com_ui_action_button')}
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|