Skip to content

Commit bbd27a6

Browse files
authored
fix: enhance img component className handling (#462)
1 parent 14473ec commit bbd27a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Markdown.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ const markdownComponents: Record<string, React.FC> = {
7171
// eslint-disable-next-line jsx-a11y/alt-text
7272
<img
7373
{...props}
74-
className="max-w-full h-auto rounded-lg shadow-md"
74+
className={`max-w-full h-auto rounded-lg shadow-md ${
75+
props.className ?? ''
76+
}`}
7577
// loading="lazy"
7678
// decoding="async"
7779
/>

0 commit comments

Comments
 (0)