File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
website/src/components/ui Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 11import type { FC } from "hono/jsx" ;
2+ import { twMerge } from "tailwind-merge" ;
23
34export type HtmlContentProps = {
45 html : string ;
@@ -7,7 +8,21 @@ export type HtmlContentProps = {
78export const HtmlContent : FC < HtmlContentProps > = ( { html } ) => {
89 return (
910 < div
10- class = "[&_img]:mx-auto [&_img]:block [&_img]:max-w-full"
11+ class = { twMerge ( [
12+ "overflow-hidden" ,
13+ "[&_img]:mx-auto" ,
14+ "[&_img]:block" ,
15+ "[&_img]:max-w-full" ,
16+ "[&_img]:h-auto" ,
17+ "[&_img]:object-contain" ,
18+ "[&_img]:w-auto" ,
19+ "[&_pre]:overflow-x-auto" ,
20+ "[&_pre]:max-w-full" ,
21+ "[&_pre]:whitespace-pre-wrap" ,
22+ "[&_pre]:break-all" ,
23+ "[&_pre_code]:block" ,
24+ "[&_pre_code]:w-full" ,
25+ ] ) }
1126 // biome-ignore lint/security/noDangerouslySetInnerHtml: typst-docsで生成されたHTMLを表示する
1227 dangerouslySetInnerHTML = { { __html : html } }
1328 />
You can’t perform that action at this time.
0 commit comments