UNPKG

@redocly/asyncapi-docs

Version:

Async API docs for Redocly Realm

2 lines (1 loc) 956 B
import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useAtomValue as e}from"jotai";import{ExternalDocumentation as m,Markdown as c,getValueFromMdParsedExtension as d,saveTextBeforeHeading as f,Section as p,Metadata as l}from"@redocly/openapi-docs";import{PageActions as x}from"@redocly/theme/components/PageActions/PageActions";import{ApiHeader as u,ExternalDocumentationWrapper as g}from"./common/index.js";import{definitionAtom as A,routingBasePathAtom as h,markdocOptionsAtom as D}from"../jotai-store/app.js";import{useTranslate as j}from"../hooks/index.js";const H=()=>{const o=e(A),n=e(h),i=e(D),s=j(),a=f(d(o.info,"description")||"");return r(p,{sectionId:n,children:[r(u,{children:[o.info.title," ",o.info.version,t(x,{pageSlug:n})]}),a&&t(c,{source:a,markdocOptions:i}),o.info.externalDocs&&t(g,{children:t(m,{externalDocs:o.info.externalDocs})}),o.info["x-metadata"]&&t(l,{metadata:o.info["x-metadata"],translate:s})]})};export{H as ApiInfo};