Chatbot Image size and list fixes (#9161)

* fixes

* add changeset

* stor

* radius

* max height

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
Dawood Khan 2024-08-21 13:43:56 -04:00 committed by GitHub
parent ba6322ec2b
commit 173c7b8624
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 30 additions and 6 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/chatbot": patch
"gradio": patch
---
fix:Chatbot Image size and list fixes

View File

@ -214,3 +214,14 @@ This document is a showcase of various Markdown capabilities.`,
]
}}
/>
<Story
name="Chatbot with image in markdown"
args={{
value: [
[
`![A cheetah](https://cdn.britannica.com/02/92702-120-6A02E613/Cheetah.jpg)`
]
]
}}
/>

View File

@ -682,6 +682,19 @@
max-height: 200px;
}
.message-wrap
> div
:not(.avatar-container)
div
:not(.image-button)
:global(img) {
border-radius: var(--radius-xl);
margin: var(--size-2);
width: 400px;
max-width: 30vw;
max-height: 30vw;
}
.message-wrap .message :global(a) {
color: var(--color-text-link);
text-decoration: underline;
@ -701,12 +714,6 @@
border: 1px solid var(--border-color-accent);
}
/* Lists */
.message-wrap :global(ol),
.message-wrap :global(ul) {
padding-inline-start: 2em;
}
/* KaTeX */
.message-wrap :global(span.katex) {
font-size: var(--text-lg);