* added draft order plugin docs * fix vale error * added note about draft order being optional * add new shipping option - shipping method link * update user guides * generate * fix github icon * changes to shipping option type * document logger * reorder list * fixes * fixes
21 lines
571 B
TypeScript
21 lines
571 B
TypeScript
import type { MDXComponents } from "mdx/types"
|
|
import Security from "./Security"
|
|
import type { OpenAPI } from "types"
|
|
import H2 from "./H2"
|
|
import { MDXComponents as UiMDXComponents } from "docs-ui"
|
|
|
|
export type ScopeType = {
|
|
specs?: OpenAPI.OpenAPIV3.Document
|
|
addToSidebar?: boolean
|
|
}
|
|
|
|
const getCustomComponents = (scope?: ScopeType): MDXComponents => {
|
|
return {
|
|
...UiMDXComponents,
|
|
Security: () => <Security specs={scope?.specs} />,
|
|
h2: (props: React.HTMLAttributes<HTMLHeadingElement>) => <H2 {...props} />,
|
|
}
|
|
}
|
|
|
|
export default getCustomComponents
|