@@ -5,7 +5,8 @@ import type { Param } from "../../types/model";
55import { normalizeDetailBlocks } from "../../utils/normalizeModel" ;
66import { joinPath } from "../../utils/path" ;
77import { ChevronRightIcon } from "../icons" ;
8- import { HtmlContent } from "./HtmlContent" ;
8+ import { HtmlBlock } from "./HtmlBlock" ;
9+ import { HtmlInline } from "./HtmlInline" ;
910import { Tooltip } from "./Tooltip" ;
1011import { TypeIcon } from "./TypeIcon" ;
1112import { buildParamId , type2href } from "./type2href" ;
@@ -66,13 +67,13 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
6667 case "html" :
6768 return (
6869 < div class = "text-gray-700" >
69- < HtmlContent html = { block . content } />
70+ < HtmlBlock html = { block . content } />
7071 </ div >
7172 ) ;
7273 case "example" :
7374 return (
74- < details class = "folding-example group" >
75- < summary class = "flex my-4 items-center gap-1 text-sm font-medium cursor-pointer text-gray-600 hover:text-gray-800 transition-colors marker:hidden" >
75+ < details class = "my-4 folding-example group" >
76+ < summary class = "flex items-center gap-1 text-sm font-medium cursor-pointer text-gray-600 hover:text-gray-800 transition-colors marker:hidden" >
7677 < div class = "w-4 h-4 text-gray-400 transform transition-transform duration-200 group-open:rotate-90" >
7778 < ChevronRightIcon />
7879 </ div >
@@ -82,7 +83,7 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
8283 />
8384 </ summary >
8485 < div >
85- < HtmlContent html = { block . content . body } />
86+ < HtmlBlock html = { block . content . body } />
8687 </ div >
8788 </ details >
8889 ) ;
@@ -93,11 +94,11 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
9394
9495 { param . strings . length > 0 && (
9596 < details
96- class = "folding-example group"
97+ class = "my-4 folding-example group"
9798 // The list of strings can be very long. For example, `page.paper` has 100+ possibilities.
9899 open = { param . strings . length <= 5 }
99100 >
100- < summary class = "flex my-4 items-center gap-1 text-sm font-medium cursor-pointer text-gray-600 hover:text-gray-800 transition-colors marker:hidden" >
101+ < summary class = "flex items-center gap-1 text-sm font-medium cursor-pointer text-gray-600 hover:text-gray-800 transition-colors marker:hidden" >
101102 < div class = "w-4 h-4 text-gray-400 transform transition-transform duration-200 group-open:rotate-90" >
102103 < ChevronRightIcon />
103104 </ div >
@@ -111,7 +112,7 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
111112 < code > { string . string } </ code >
112113 </ div >
113114 < div >
114- < HtmlContent html = { string . details } />
115+ < HtmlBlock html = { string . details } />
115116 </ div >
116117 </ div >
117118 </ li >
@@ -121,10 +122,10 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
121122 ) }
122123
123124 { param . default && (
124- < div class = "flex flex-wrap items-center gap-2" >
125+ < p >
125126 < Translation translationKey = "defaultValue" />
126- < HtmlContent html = { param . default } />
127- </ div >
127+ < HtmlInline html = { param . default } />
128+ </ p >
128129 ) }
129130 </ div >
130131 ) ) }
0 commit comments