From 3eb752159b7cf6526ca026e2ad09c6fc33b1f789 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Wed, 17 Jan 2024 16:28:02 -0800 Subject: [PATCH] Add not-enabled component --- content/@theme/markdoc/components.tsx | 9 ++++++++- content/@theme/markdoc/schema.ts | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/content/@theme/markdoc/components.tsx b/content/@theme/markdoc/components.tsx index f431da914b..b4e7b1fe10 100644 --- a/content/@theme/markdoc/components.tsx +++ b/content/@theme/markdoc/components.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; // @ts-ignore import dynamicReact from '@markdoc/markdoc/dist/react'; -import { usePageSharedData } from '@portal/hooks'; +import { usePageSharedData, useTranslate } from '@portal/hooks'; import { Link } from '@portal/Link'; import { idify } from '../helpers'; @@ -139,3 +139,10 @@ export function Badge(props: { function shieldsIoEscape(s: string) { return s.trim().replaceAll('-', '--').replaceAll('_', '__') } + +export function NotEnabled() { + const { translate } = useTranslate(); + return ( + + ) +} diff --git a/content/@theme/markdoc/schema.ts b/content/@theme/markdoc/schema.ts index 5660855783..3869b2e928 100644 --- a/content/@theme/markdoc/schema.ts +++ b/content/@theme/markdoc/schema.ts @@ -126,3 +126,9 @@ export const badge: Schema & { tagName: string } = { }, render: 'Badge' }; + +export const notEnabled: Schema & { tagName: string } = { + tagName: 'not-enabled', + render: 'NotEnabled', + selfClosing: true, +};