docs: resdesign and restructure modules references (#5372)

* docs: change format of module reference

* description fix

* update structure + comments

* added new options to README

* small text fix

* change section ordering

* change how required/optional are shown

* remove optional text

* docs: redesigned accordion
This commit is contained in:
Shahed Nasser
2023-10-16 19:51:55 +03:00
committed by GitHub
parent 3dada88c81
commit 2d74ec256f
218 changed files with 5434 additions and 7684 deletions

View File

@@ -17,18 +17,13 @@ export const CodeMdx = ({ className, children }: CodeMdxProps) => {
const match = /language-(\w+)/.exec(className || "")
const codeContent = Array.isArray(children)
? (children[0] as string)
: (children as string)
if (match) {
return (
<CodeBlock
source={
Array.isArray(children)
? (children[0] as string)
: (children as string)
}
lang={match[1]}
/>
)
return <CodeBlock source={codeContent} lang={match[1]} />
}
return <InlineCode>{children}</InlineCode>
return <InlineCode>{codeContent}</InlineCode>
}