add image input (#486)

* add image input

* use json
This commit is contained in:
heheer
2023-11-17 18:22:29 +08:00
committed by GitHub
parent af16817a4a
commit 70f3373246
9 changed files with 181 additions and 28 deletions

View File

@@ -0,0 +1,18 @@
import { Box, Flex } from '@chakra-ui/react';
import MdImage from '../img/Image';
const ImageBlock = ({ images }: { images: string }) => {
return (
<Flex w={'100%'} wrap={'wrap'}>
{JSON.parse(images).map((src: string) => {
return (
<Box key={src} mr={2} mb={2} rounded={'md'} flex={'0 0 auto'} w={'100px'} h={'100px'}>
<MdImage src={src} />
</Box>
);
})}
</Flex>
);
};
export default ImageBlock;