11import type { FC } from "hono/jsx" ;
22import type { Func } from "../../types/model" ;
33import { ChevronRightIcon } from "../icons" ;
4+ import { HtmlContent } from "./HtmlContent" ;
45import { Tooltip } from "./Tooltip" ;
56import { TypeIcon } from "./TypeIcon" ;
67import { type2href } from "./type2href" ;
@@ -47,10 +48,9 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
4748 </ div >
4849 </ h4 >
4950
50- < div
51- class = "mb-3 text-gray-700"
52- dangerouslySetInnerHTML = { { __html : param . details } }
53- />
51+ < div class = "mb-3 text-gray-700" >
52+ < HtmlContent html = { param . details } />
53+ </ div >
5454
5555 { param . strings . length > 0 && (
5656 < div class = "mt-3" >
@@ -64,10 +64,9 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
6464 < div class = "mb-1" >
6565 < code class = "text-gray-800" > { string . string } </ code >
6666 </ div >
67- < div
68- class = "text-sm text-gray-700"
69- dangerouslySetInnerHTML = { { __html : string . details } }
70- />
67+ < div class = "text-sm text-gray-700" >
68+ < HtmlContent html = { string . details } />
69+ </ div >
7170 </ div >
7271 </ li >
7372 ) ) }
@@ -78,10 +77,9 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
7877 { param . default && (
7978 < p class = "mt-3 text-sm" >
8079 < span class = "font-medium" > デフォルト値:</ span > { " " }
81- < span
82- class = "text-gray-700"
83- dangerouslySetInnerHTML = { { __html : param . default } }
84- />
80+ < span class = "text-gray-700" >
81+ < HtmlContent html = { param . default } />
82+ </ span >
8583 </ p >
8684 ) }
8785
@@ -93,10 +91,9 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
9391 </ div >
9492 例を表示
9593 </ summary >
96- < div
97- class = "mt-2 bg-white p-3 rounded-md border border-gray-200 text-sm [&_img]:mx-auto [&_img]:block [&_img]:max-w-full"
98- dangerouslySetInnerHTML = { { __html : param . example } }
99- />
94+ < div class = "mt-2 bg-white p-3 rounded-md border border-gray-200 text-sm" >
95+ < HtmlContent html = { param . example } />
96+ </ div >
10097 </ details >
10198 ) }
10299 </ div >
0 commit comments