chore(markdown): optimize message image display

This commit is contained in:
molvqingtai 2023-10-15 05:07:38 +08:00
parent 97710d200d
commit 66fb140db1

View file

@ -16,7 +16,7 @@ const Markdown: FC<MarkdownProps> = ({ children = '', className }) => {
h1: ({ className, ...props }) => <h1 className={cn('mb-2 mt-0 text-2xl', className)} {...props} />, h1: ({ className, ...props }) => <h1 className={cn('mb-2 mt-0 text-2xl', className)} {...props} />,
h2: ({ className, ...props }) => <h2 className={cn('mb-2 mt-0', className)} {...props} />, h2: ({ className, ...props }) => <h2 className={cn('mb-2 mt-0', className)} {...props} />,
img: ({ className, alt, ...props }) => ( img: ({ className, alt, ...props }) => (
<img className={cn('my-2 max-w-[50%] rounded-md border', className)} alt={alt} {...props} /> <img className={cn('my-2 max-w-[50%]', className)} alt={alt} {...props} />
), ),
ul: ({ className, ...props }) => { ul: ({ className, ...props }) => {
Reflect.deleteProperty(props, 'ordered') Reflect.deleteProperty(props, 'ordered')