docs: improvements and fixes to components in API reference (#9410)

- Change layout of parameters for clearer display
- Fix schema code blocks being longer than container
- switch between showing required to showing optional indicator
- Fixed code tabs not having copy / report buttons

Closes DOCS-936

Preview: https://api-reference-v2-git-docs-api-ref-comp-improv-medusajs.vercel.app/v2/api/store
This commit is contained in:
Shahed Nasser
2024-10-09 17:51:27 +00:00
committed by GitHub
parent 8d3e7b3336
commit 7f1f075222
14 changed files with 239 additions and 187 deletions
@@ -15,7 +15,7 @@ export type CodeBlockActionsProps = {
inInnerCode?: boolean
isCollapsed: boolean
canShowApiTesting?: boolean
onApiTesting: React.Dispatch<React.SetStateAction<boolean>>
onApiTesting?: React.Dispatch<React.SetStateAction<boolean>>
noReport?: boolean
noCopy?: boolean
}
@@ -91,7 +91,7 @@ export const CodeBlockActions = ({
inHeader && "p-[4.5px]",
"cursor-pointer"
)}
onClick={() => onApiTesting(true)}
onClick={() => onApiTesting?.(true)}
>
<PlaySolid className={clsx(iconClassName)} />
</span>