Skip to content

Commit

Permalink
add margin-left to list item text
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed May 31, 2024
1 parent 7e85d6b commit ca2836a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions opentrons-ai-client/src/molecules/ChatDisplay/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,18 @@ export function ChatDisplay({ chat, chatId }: ChatDisplayProps): JSX.Element {
position={POSITION_RELATIVE}
>
{isUser ? (
<Markdown>{reply}</Markdown>
<Markdown
components={{
div: undefined,
ul: UnnumberedListText,
h2: HeaderText,
li: ListItemText,
p: ParagraphText,
a: ExternalLink,
}}
>
{reply}
</Markdown>
) : (
<Markdown
components={{
Expand Down Expand Up @@ -125,7 +136,7 @@ function HeaderText(props: JSX.IntrinsicAttributes): JSX.Element {
}

function ListItemText(props: JSX.IntrinsicAttributes): JSX.Element {
return <StyledText {...props} as="li" />
return <StyledText {...props} as="li" marginLeft={SPACING.spacing16} />
}

function UnnumberedListText(props: JSX.IntrinsicAttributes): JSX.Element {
Expand Down

0 comments on commit ca2836a

Please sign in to comment.