UNPKG

@plteam/chat-ui

Version:

CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript

18 lines (17 loc) 732 B
import * as React from 'react'; import { CloseRoundedIcon } from '../../../icons'; import { useChatCoreSlots } from '../../core/ChatSlotsContext'; const PreviewDeleteButton = ({ onClick }) => { const coreSlots = useChatCoreSlots(); return (React.createElement(coreSlots.iconButton, { size: 'small', sx: { position: 'absolute', top: 8, right: 8, backgroundColor: (theme) => theme.palette.background.default, ':hover': { backgroundColor: (theme) => theme.palette.action.hover, } }, onClick: onClick }, React.createElement(CloseRoundedIcon, { fontSize: 'small' }))); }; export default PreviewDeleteButton;