Keep composer drafts across reloads and preview attached images
The composer's unsent text and uploaded files are kept in localStorage per bot and workspace until sent. Picked images show a small preview in place of their icon. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import Img from "@moduletrace/twui/layout/Img";
|
||||
|
||||
type Props = {
|
||||
src: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* A picked image's preview, the size of the icon it stands in for.
|
||||
*/
|
||||
export default function ComposerAttachmentPreview({ src }: Props) {
|
||||
return (
|
||||
<Img
|
||||
src={src}
|
||||
alt=""
|
||||
className="size-7 shrink-0 rounded-sm object-cover"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user