Files
llink/js/desktop/src/features/compose/text-compose-step.tsx
T
Arjun PatelandGitHub a8a0b7db1b infra: add linting and formatting for js projects (#230)
* wip

* wip

* wip

* format

* wip(mobile): lint and format

* cleanup

* nits

* nits

* idiomatic react

* nit

* format all root files
2026-06-02 07:44:24 -07:00

49 lines
1.1 KiB
TypeScript

import { TextEditor } from '@/features/compose/text-editor';
import type { PendingAttachment } from '@/features/compose/attachment-strip';
interface TextComposeStepProps {
textContent: string;
onTextChange: (text: string) => void;
onAdvance: () => void;
onCancel: () => void;
attachments: PendingAttachment[];
onRemoveAttachment: (id: string) => void;
onAddFiles: () => void;
isDragging: boolean;
dropZoneProps: {
onDragOver: (e: React.DragEvent) => void;
onDragEnter: (e: React.DragEvent) => void;
onDragLeave: (e: React.DragEvent) => void;
onDrop: (e: React.DragEvent) => void;
};
}
export function TextComposeStep({
textContent,
onTextChange,
onAdvance,
onCancel,
attachments,
onRemoveAttachment,
onAddFiles,
isDragging,
dropZoneProps,
}: TextComposeStepProps) {
return (
<TextEditor
textContent={textContent}
onTextChange={onTextChange}
onSubmit={onAdvance}
onCancel={onCancel}
submitHint="next"
attachmentProps={{
attachments,
onRemoveAttachment,
onAddFiles,
isDragging,
dropZoneProps,
}}
/>
);
}