mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-01-23 11:17:02 +00:00
17 lines
581 B
TypeScript
17 lines
581 B
TypeScript
import WithTooltip from '~/components/ui/Tooltip';
|
|
import { IconButton } from '~/components/ui/IconButton';
|
|
import { exportChat } from '~/utils/chatExport';
|
|
import React from 'react';
|
|
import type { Message } from 'ai';
|
|
|
|
export const ExportChatButton = ({description, messages}: {description: string, messages: Message[]}) => {
|
|
return (<WithTooltip tooltip="Export Chat">
|
|
<IconButton
|
|
title="Export Chat"
|
|
onClick={() => exportChat(messages || [], description)}
|
|
>
|
|
<div className="i-ph:download-simple text-xl"></div>
|
|
</IconButton>
|
|
</WithTooltip>);
|
|
}
|