Skip to content

Commit 26fdfe0

Browse files
committedMar 7, 2025
Update docs
1 parent 544bff6 commit 26fdfe0

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed
 

‎lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686

8787
/**
8888
* @typedef {Options & HooksOptionsOnly} HooksOptions
89-
* Configuration for {@linkcode MarkdownHooks},
90-
* extending the regular {@linkcode Options} with a `fallback` prop.
89+
* Configuration for {@linkcode MarkdownHooks};
90+
* extends the regular {@linkcode Options} with a `fallback` prop.
9191
*/
9292

9393
/**

‎readme.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ React component to render markdown.
3838
* [`AllowElement`](#allowelement)
3939
* [`Components`](#components)
4040
* [`ExtraProps`](#extraprops)
41+
* [`HooksOptions`](#hooksoptions)
4142
* [`Options`](#options)
4243
* [`UrlTransform`](#urltransform)
4344
* [Examples](#examples)
@@ -227,7 +228,7 @@ see [`MarkdownAsync`][api-markdown-async].
227228

228229
###### Returns
229230

230-
React element (`ReactElement`).
231+
React node (`ReactNode`).
231232

232233
### `defaultUrlTransform(url)`
233234

@@ -283,6 +284,20 @@ Extra fields we pass to components (TypeScript type).
283284
* `node` ([`Element` from `hast`][github-hast-element], optional)
284285
— original node
285286
287+
### `HooksOptions`
288+
289+
Configuration for [`MarkdownHooks`][api-markdown-hooks] (TypeScript type);
290+
extends the regular [`Options`][api-options] with a `fallback` prop.
291+
292+
###### Extends
293+
294+
[`Options`][api-options].
295+
296+
###### Fields
297+
298+
* `fallback` (`ReactNode`, optional)
299+
— content to render while the processor processing the markdown
300+
286301
### `Options`
287302
288303
Configuration (TypeScript type).
@@ -583,8 +598,9 @@ extensions.
583598
This package is fully typed with [TypeScript][].
584599
It exports the additional types
585600
[`AllowElement`][api-allow-element],
586-
[`ExtraProps`][api-extra-props],
587601
[`Components`][api-components],
602+
[`ExtraProps`][api-extra-props],
603+
[`HooksOptions`][api-hooks-options],
588604
[`Options`][api-options], and
589605
[`UrlTransform`][api-url-transform].
590606
@@ -816,6 +832,8 @@ abide by its terms.
816832

817833
[api-extra-props]: #extraprops
818834

835+
[api-hooks-options]: #hooksoptions
836+
819837
[api-markdown]: #markdown
820838

821839
[api-markdown-async]: #markdownasync

0 commit comments

Comments
 (0)
Please sign in to comment.