@graphql-markdown/docusaurus
Version:
Docusaurus plugin for generating Markdown documentation from a GraphQL schema.
28 lines (23 loc) • 1.05 kB
JavaScript
"use strict";
/**
* @module mdx
* This module provides MDX React components.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.mdxDeclaration = void 0;
/**
* MDX helper components injected into generated documents so Docusaurus
* can render badges, bullets, details, and SpecifiedBy links without
* requiring manual component registration in every project.
*
* @packageDocumentation
*/
/**
* String literal that declares the React helpers (`Bullet`, `SpecifiedBy`, etc.)
* which GraphQL-Markdown prepends to every generated MDX file.
*/
exports.mdxDeclaration = `
export const Bullet = () => <><span style={{ fontWeight: 'normal', fontSize: '.5em', color: 'var(--ifm-color-secondary-darkest)' }}> ● </span></>
export const SpecifiedBy = (props) => <>Specification<a className="link" style={{ fontSize:'1.5em', paddingLeft:'4px' }} target="_blank" href={props.url} title={'Specified by ' + props.url}>⎘</a></>
export const Badge = (props) => <><span className={props.class}>{props.text}</span></>
`;