docs: add TSDoc for payment processor + generate docs (#5917)
* added tsdocs for payment processor * generated reference for payment processor
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
TriangleRightMini,
|
||||
} from "@medusajs/icons"
|
||||
import IconFlagMini from "../../../theme/Icon/FlagMini"
|
||||
import decodeStr from "../../../utils/decode-str"
|
||||
|
||||
type ParameterTypesItemsProps = {
|
||||
parameters: Parameter[]
|
||||
@@ -127,7 +128,7 @@ const ParameterTypesItems = ({
|
||||
/>
|
||||
)}
|
||||
<div className="flex gap-0.75 flex-wrap">
|
||||
<InlineCode>{parameter.name}</InlineCode>
|
||||
<InlineCode>{decodeStr(parameter.name)}</InlineCode>
|
||||
<span className="font-monospace text-compact-small-plus text-medusa-fg-subtle">
|
||||
<MarkdownContent allowedElements={["a"]} unwrapDisallowed={true}>
|
||||
{parameter.type}
|
||||
|
||||
8
www/apps/docs/src/utils/decode-str.ts
Normal file
8
www/apps/docs/src/utils/decode-str.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export default function decodeStr(str: string) {
|
||||
return str
|
||||
.replaceAll("<", "<")
|
||||
.replaceAll("{", "{")
|
||||
.replaceAll("}", "}")
|
||||
.replaceAll(">", ">")
|
||||
.replaceAll("\\|", "|")
|
||||
}
|
||||
Reference in New Issue
Block a user