From c2d5a4593058148fbe4caae1a30be9bbf3fccc0d Mon Sep 17 00:00:00 2001 From: Nicholas Boll Date: Tue, 26 Nov 2019 17:11:50 -0700 Subject: [PATCH] Add element properties to markdown-to-jsx (#40542) --- types/markdown-to-jsx/index.d.ts | 2 +- types/markdown-to-jsx/markdown-to-jsx-tests.tsx | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/types/markdown-to-jsx/index.d.ts b/types/markdown-to-jsx/index.d.ts index b50450be85..0cb0a370a4 100644 --- a/types/markdown-to-jsx/index.d.ts +++ b/types/markdown-to-jsx/index.d.ts @@ -8,7 +8,7 @@ import * as React from 'react'; export default class Markdown extends React.Component { } -export interface MarkdownProps { +export interface MarkdownProps extends React.HTMLAttributes { options?: MarkdownOptions; // React.ReactNode contains both null and undefined // tslint:disable-next-line:no-null-undefined-union diff --git a/types/markdown-to-jsx/markdown-to-jsx-tests.tsx b/types/markdown-to-jsx/markdown-to-jsx-tests.tsx index af78fca4ad..835f81b31c 100644 --- a/types/markdown-to-jsx/markdown-to-jsx-tests.tsx +++ b/types/markdown-to-jsx/markdown-to-jsx-tests.tsx @@ -63,3 +63,9 @@ render( ); str }}># 中文; + +// supports passing extra properties to the underlying element +{` +# Header 1 +## Header 2 +`};