From bd6baccbe07b96d81a8ccbe418ee5ad676decf1a Mon Sep 17 00:00:00 2001 From: Angus Hollands Date: Thu, 21 Mar 2024 20:45:43 +0000 Subject: [PATCH] =?UTF-8?q?=E2=8C=A8=EF=B8=8F=20Add=20`keyboard`=20rendere?= =?UTF-8?q?r=20(#334)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rowan Cockett --- packages/myst-to-react/src/basic.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/myst-to-react/src/basic.tsx b/packages/myst-to-react/src/basic.tsx index 1630d7b5d..17de02f09 100644 --- a/packages/myst-to-react/src/basic.tsx +++ b/packages/myst-to-react/src/basic.tsx @@ -46,6 +46,10 @@ type Aside = { type: 'aside'; }; +type Keyboard = { + type: 'keyboard'; +}; + type BasicNodeRenderers = { text: NodeRenderer; span: NodeRenderer; @@ -79,6 +83,7 @@ type BasicNodeRenderers = { captionNumber: NodeRenderer; delete: NodeRenderer; underline: NodeRenderer; + keyboard: NodeRenderer; smallcaps: NodeRenderer; // definitions definitionList: NodeRenderer; @@ -375,6 +380,13 @@ const BASIC_RENDERERS: BasicNodeRenderers = { ); }, + keyboard({ node }) { + return ( + + + + ); + }, }; export default BASIC_RENDERERS;