mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-02 18:10:18 +05:30
feat(renderer): ExportDialogFooter (shared cancel/export row)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { DialogFooter } from '@/components/ui/dialog';
|
||||
|
||||
interface Props {
|
||||
onCancel: () => void;
|
||||
onSubmit: () => void;
|
||||
submitting: boolean;
|
||||
submitLabel: string;
|
||||
submitDisabled?: boolean;
|
||||
}
|
||||
|
||||
export function ExportDialogFooter({ onCancel, onSubmit, submitting, submitLabel, submitDisabled }: Props) {
|
||||
return (
|
||||
<DialogFooter>
|
||||
<Button variant="ghost" onClick={onCancel} disabled={submitting}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={onSubmit} disabled={submitting || submitDisabled}>
|
||||
{submitting ? 'Exporting…' : submitLabel}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user