@@ -104,7 +104,7 @@ Yields:
104
104
105
105
## API
106
106
107
- This package exports the identifier [ ` toJsxRuntime ` ] [ tojsxruntime ] .
107
+ This package exports the identifier [ ` toJsxRuntime ` ] [ api-to-jsx-runtime ] .
108
108
There is no default export.
109
109
110
110
### ` toJsxRuntime(tree, options) `
@@ -116,7 +116,7 @@ automatic JSX runtime.
116
116
117
117
* ` tree ` ([ ` Node ` ] [ node ] )
118
118
— tree to transform
119
- * ` options ` ([ ` Options ` ] [ options ] , required)
119
+ * ` options ` ([ ` Options ` ] [ api- options] , required)
120
120
— configuration
121
121
122
122
###### Returns
@@ -131,19 +131,19 @@ Configuration (TypeScript type).
131
131
132
132
###### ` Fragment `
133
133
134
- Fragment ([ ` Fragment ` ] [ fragment ] , required).
134
+ Fragment ([ ` Fragment ` ] [ api- fragment] , required).
135
135
136
136
###### ` jsx `
137
137
138
- Dynamic JSX ([ ` Jsx ` ] [ jsx ] , required in production).
138
+ Dynamic JSX ([ ` Jsx ` ] [ api- jsx] , required in production).
139
139
140
140
###### ` jsxs `
141
141
142
- Static JSX ([ ` Jsx ` ] [ jsx ] , required in production).
142
+ Static JSX ([ ` Jsx ` ] [ api- jsx] , required in production).
143
143
144
144
###### ` jsxDEV `
145
145
146
- Development JSX ([ ` JsxDev ` ] [ jsxdev ] , required in development).
146
+ Development JSX ([ ` JsxDev ` ] [ api-jsx-dev ] , required in development).
147
147
148
148
###### ` development `
149
149
@@ -152,7 +152,7 @@ default: `false`).
152
152
153
153
###### ` components `
154
154
155
- Components to use ([ ` Partial<Components> ` ] [ components ] , optional).
155
+ Components to use ([ ` Partial<Components> ` ] [ api- components] , optional).
156
156
157
157
Each key is the name of an HTML (or SVG) element to override.
158
158
The value is the component to render instead.
@@ -167,16 +167,17 @@ Passed in source info to `jsxDEV` when using the automatic runtime with
167
167
###### ` elementAttributeNameCase `
168
168
169
169
Specify casing to use for attribute names
170
- ([ ` ElementAttributeNameCase ` ] [ elementattributenamecase ] , default: ` 'react' ` ).
170
+ ([ ` ElementAttributeNameCase ` ] [ api-element-attribute-name-case ] , default:
171
+ ` 'react' ` ).
171
172
172
173
###### ` passNode `
173
174
174
175
Pass the hast element node to components (` boolean ` , default: ` false ` ).
175
176
176
177
###### ` space `
177
178
178
- Whether ` tree ` is in the ` 'html' ` or ` 'svg' ` space ([ ` Space ` ] [ space ] , default:
179
- ` 'html' ` ).
179
+ Whether ` tree ` is in the ` 'html' ` or ` 'svg' ` space ([ ` Space ` ] [ api- space] ,
180
+ default: ` 'html' ` ).
180
181
181
182
When an ` <svg> ` element is found in the HTML space, this package already
182
183
automatically switches to and from the SVG space when entering and exiting
@@ -250,7 +251,7 @@ Create a production element (TypeScript type).
250
251
251
252
* ` type ` ( ` unknown ` )
252
253
— element type: ` Fragment ` symbol, tag name ( ` string ` ), component
253
- * ` props ` ([ ` Props ` ][props])
254
+ * ` props ` ([ ` Props ` ][api- props])
254
255
— element props, ` children ` , and maybe ` node `
255
256
* ` key ` ( ` string ` or ` undefined ` )
256
257
— dynamicly generated key to use
@@ -267,13 +268,13 @@ Create a development element (TypeScript type).
267
268
268
269
* ` type ` ( ` unknown ` )
269
270
— element type: ` Fragment ` symbol, tag name ( ` string ` ), component
270
- * ` props ` ([ ` Props ` ][props])
271
+ * ` props ` ([ ` Props ` ][api- props])
271
272
— element props, ` children ` , and maybe ` node `
272
273
* ` key ` ( ` string ` or ` undefined ` )
273
274
— dynamicly generated key to use
274
275
* ` isStaticChildren ` ( ` boolean ` )
275
276
— whether more than one children are used
276
- * ` source ` ([ ` Source ` ][source])
277
+ * ` source ` ([ ` Source ` ][api- source])
277
278
— info about source
278
279
* ` self ` ( ` undefined ` )
279
280
— nothing (this is used by frameworks that have components, we don’t)
@@ -415,10 +416,11 @@ followed by browsers such as Chrome, Firefox, and Safari.
415
416
## Types
416
417
417
418
This package is fully typed with [ TypeScript] [ ] .
418
- It exports the additional types [ ` Components ` ] [ components ] ,
419
- [ ` ElementAttributeNameCase ` ] [ elementattributenamecase ] ,
420
- [ ` Fragment ` ] [ fragment ] , [ ` Jsx ` ] [ jsx ] , [ ` JsxDev ` ] [ jsxdev ] , [ ` Options ` ] [ options ] ,
421
- [ ` Props ` ] [ props ] , [ ` Source ` ] [ source ] , and [ ` Space ` ] [ Space ] .
419
+ It exports the additional types [ ` Components ` ] [ api-components ] ,
420
+ [ ` ElementAttributeNameCase ` ] [ api-element-attribute-name-case ] ,
421
+ [ ` Fragment ` ] [ api-fragment ] , [ ` Jsx ` ] [ api-jsx ] , [ ` JsxDev ` ] [ api-jsx-dev ] ,
422
+ [ ` Options ` ] [ api-options ] , [ ` Props ` ] [ api-props ] , [ ` Source ` ] [ api-source ] ,
423
+ and [ ` Space ` ] [ api-Space ] .
422
424
423
425
The function ` toJsxRuntime ` returns a ` JSX.Element ` , which means that the JSX
424
426
namespace has to by typed.
@@ -516,22 +518,22 @@ abide by its terms.
516
518
517
519
[ jsx-runtime ] : https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html
518
520
519
- [ options ] : #options
521
+ [ api-to-jsx-runtime ] : #tojsxruntimetree- options
520
522
521
- [ tojsxruntime ] : #tojsxruntimetree-options
523
+ [ api-components ] : #components-1
522
524
523
- [ fragment ] : #fragment -1
525
+ [ api-element-attribute-name-case ] : #elementattributenamecase -1
524
526
525
- [ jsx ] : #jsx -1
527
+ [ api-fragment ] : #fragment -1
526
528
527
- [ jsxdev ] : #jsxdev -1
529
+ [ api-jsx ] : #jsx -1
528
530
529
- [ props ] : #props
531
+ [ api-jsx-dev ] : #jsxdev-1
530
532
531
- [ source ] : #source
533
+ [ api-options ] : #options
532
534
533
- [ space ] : #space-1
535
+ [ api-props ] : #props
534
536
535
- [ components ] : #components-1
537
+ [ api-source ] : #source
536
538
537
- [ elementattributenamecase ] : #elementattributenamecase -1
539
+ [ api-space ] : #space -1
0 commit comments