This commit is contained in:
Archer
2023-09-18 21:26:42 +08:00
committed by GitHub
parent 81e37a5736
commit 06be57815e
24 changed files with 459 additions and 707 deletions

View File

@@ -613,11 +613,6 @@ const ChatBox = (
flexDirection={'column'}
alignItems={item.obj === 'Human' ? 'flex-end' : 'flex-start'}
py={5}
_hover={{
'& .control': {
display: item.status === 'finish' ? 'flex' : 'none'
}
}}
>
{item.obj === 'Human' && (
<>

View File

@@ -10,11 +10,10 @@ import {
} from '@chakra-ui/react';
interface Props extends ModalContentProps {
showCloseBtn?: boolean;
title?: any;
isCentered?: boolean;
isOpen: boolean;
onClose: () => void;
onClose?: () => void;
}
const MyModal = ({
@@ -22,14 +21,18 @@ const MyModal = ({
onClose,
title,
children,
showCloseBtn = true,
isCentered,
w = 'auto',
maxW = ['90vw', '600px'],
...props
}: Props) => {
return (
<Modal isOpen={isOpen} onClose={onClose} autoFocus={false} isCentered={isCentered}>
<Modal
isOpen={isOpen}
onClose={() => onClose && onClose()}
autoFocus={false}
isCentered={isCentered}
>
<ModalOverlay />
<ModalContent
display={'flex'}
@@ -43,7 +46,7 @@ const MyModal = ({
>
{!!title && <ModalHeader>{title}</ModalHeader>}
<Box overflow={'overlay'} h={'100%'}>
{showCloseBtn && <ModalCloseButton />}
{onClose && <ModalCloseButton />}
{children}
</Box>
</ModalContent>