@redocly/asyncapi-docs
Version:
Async API docs for Redocly Realm
4 lines (3 loc) • 790 B
JavaScript
import{Fragment as l,jsx as t,jsxs as h}from"react/jsx-runtime";import{useAtomValue as s}from"jotai";import g from"styled-components";import{Markdown as i,Section as f}from"@redocly/openapi-docs";import{combineUrls as e}from"@redocly/theme/core/openapi";import{generateAst as c}from"../utils/index.js";import{markdocOptionsAtom as k,routingBasePathAtom as S}from"../jotai-store/app.js";const w=({item:o})=>{const a=s(k),n=s(S),d=c(o.ast);return h(l,{children:[t(m,{sectionId:e(n,o.dataSectionId),children:t(i,{ast:d,markdocOptions:a})}),o.items.map(r=>{const p=c(r.ast);return t(m,{sectionId:e(n,r.dataSectionId),children:t(i,{ast:p,markdocOptions:a})},r.link)})]})},m=g(f)`
scroll-margin-top: calc(var(--navbar-height) + var(--banner-height)) !important;
`;export{w as MarkdownSection};