mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Add element properties to markdown-to-jsx (#40542)
This commit is contained in:
committed by
Andrew Casey
parent
2703151cbb
commit
c2d5a45930
2
types/markdown-to-jsx/index.d.ts
vendored
2
types/markdown-to-jsx/index.d.ts
vendored
@@ -8,7 +8,7 @@ import * as React from 'react';
|
||||
|
||||
export default class Markdown extends React.Component<MarkdownProps> { }
|
||||
|
||||
export interface MarkdownProps {
|
||||
export interface MarkdownProps extends React.HTMLAttributes<HTMLElement> {
|
||||
options?: MarkdownOptions;
|
||||
// React.ReactNode contains both null and undefined
|
||||
// tslint:disable-next-line:no-null-undefined-union
|
||||
|
||||
@@ -63,3 +63,9 @@ render(
|
||||
);
|
||||
|
||||
<Markdown options={{ slugify: str => str }}># 中文</Markdown>;
|
||||
|
||||
// supports passing extra properties to the underlying element
|
||||
<Markdown className="markdown-body">{`
|
||||
# Header 1
|
||||
## Header 2
|
||||
`}</Markdown>;
|
||||
|
||||
Reference in New Issue
Block a user