Build beautiful, interactive API Docs with embeddable React or Web Components, powered by OpenAPI and Markdown.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by stoplight-bot almost 5 years ago
Published by stoplight-bot about 5 years ago
tabs
prop to render the tabs you need. For example:import { Page } from '@stoplight/elements';
import { Docs } from '@stoplight/elements/components/Docs';
import { TryIt } from '@stoplight/elements/components/TryIt';
<Page
srn="gh/stoplightio/elements/README.md"
tabs={({ node }) => {
const tabs = [ { title: 'Docs', content: <Docs node={node} /> } ];
if (node.type === 'http_operation') {
tabs.push({ title: 'Try It', content: <TryIt value={node.value} /> })
}
return tabs;
}}
/>
import { Provider, Hub, Page, TableOfContents } from '@stoplight/elements';
import { Page as PageComponent } from '@stoplight/elements/components/Page';
import { TableOfContents as TableOfContentsComponent } from '@stoplight/elements/components/TableOfContents';
import { Docs } from '@stoplight/elements/components/Docs';
import { Changelog } from '@stoplight/elements/components/Changelog';