From c6b0d26f73e28de1bb0331fd22d3e84f1d6380c6 Mon Sep 17 00:00:00 2001 From: Davie Date: Mon, 22 Jan 2024 15:53:45 +0000 Subject: [PATCH] add OpenAPI component to mdx components --- packages/mdx-components/package.json | 1 + packages/mdx-components/src/components.ts | 6 ++++++ packages/site-components-next/src/mdx/index.tsx | 2 ++ 3 files changed, 9 insertions(+) diff --git a/packages/mdx-components/package.json b/packages/mdx-components/package.json index a427bae8..03fd14e9 100644 --- a/packages/mdx-components/package.json +++ b/packages/mdx-components/package.json @@ -41,6 +41,7 @@ }, "dependencies": { "@jpmorganchase/mosaic-components": "^0.1.0-beta.62", + "@jpmorganchase/mosaic-open-api-component": "^0.1.0-beta.62", "@jpmorganchase/mosaic-site-components": "^0.1.0-beta.62", "@jpmorganchase/mosaic-theme": "^0.1.0-beta.62", "clsx": "^2.0.0", diff --git a/packages/mdx-components/src/components.ts b/packages/mdx-components/src/components.ts index f05bbfab..f7343d03 100644 --- a/packages/mdx-components/src/components.ts +++ b/packages/mdx-components/src/components.ts @@ -86,6 +86,11 @@ import { ViewStackProps } from '@jpmorganchase/mosaic-components'; +import { + OpenAPI as MosaicOpenAPI, + type OpenAPIProps +} from '@jpmorganchase/mosaic-open-api-component'; + import { withMarkdownSpacing } from './withMarkdownSpacing'; export { @@ -145,6 +150,7 @@ export const LinkButton = withMarkdownSpacing(MosaicLinkButton) export const LinkText = withMarkdownSpacing(MosaicLinkText); export const Links = withMarkdownSpacing(MosaicLinks); export const ListItem = withMarkdownSpacing(MosaicListItem); +export const OpenAPI = withMarkdownSpacing(MosaicOpenAPI); export const OrderedList = withMarkdownSpacing(MosaicOrderedList); export const Tag = withMarkdownSpacing(MosaicTag); export const SecondaryNavbar = withMarkdownSpacing(MosaicSecondaryNavbar); diff --git a/packages/site-components-next/src/mdx/index.tsx b/packages/site-components-next/src/mdx/index.tsx index db66bf3f..fc97b0db 100644 --- a/packages/site-components-next/src/mdx/index.tsx +++ b/packages/site-components-next/src/mdx/index.tsx @@ -66,6 +66,7 @@ import { LinkText, Links, ListItem, + OpenAPI, OrderedList, P1, P2, @@ -188,6 +189,7 @@ export const mdxComponents = { LinkText, Links, ListItem, + OpenAPI, OrderedList, P1, P2,