docs: add TSDoc for payment processor + generate docs (#5917)

* added tsdocs for payment processor

* generated reference for payment processor
This commit is contained in:
Shahed Nasser
2023-12-18 14:02:18 +02:00
committed by GitHub
parent e63f4e6c7a
commit ddc6cc13a0
73 changed files with 34162 additions and 17470 deletions

View File

@@ -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}

View File

@@ -0,0 +1,8 @@
export default function decodeStr(str: string) {
return str
.replaceAll("&#60;", "<")
.replaceAll("&#123;", "{")
.replaceAll("&#125;", "}")
.replaceAll("&#62;", ">")
.replaceAll("\\|", "|")
}