Skip to content

Commit 29c5bcd

Browse files
authored
docs: fix syntax that couldn't be parsed (#10207)
1 parent 37d1f2d commit 29c5bcd

File tree

2 files changed

+42
-42
lines changed

2 files changed

+42
-42
lines changed

docs/admin/hooks.mdx

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ The `useForm` hook returns an object with the following properties:
176176
rows={[
177177
[
178178
{
179-
value: <strong><code>fields</code></strong>,
179+
value: `<strong><code>fields</code></strong>`,
180180
},
181181
{
182182
value: "Deprecated. This property cannot be relied on as up-to-date.",
@@ -187,7 +187,7 @@ The `useForm` hook returns an object with the following properties:
187187
],
188188
[
189189
{
190-
value: <strong><code>submit</code></strong>,
190+
value: `<strong><code>submit</code></strong>`,
191191
},
192192
{
193193
value: "Method to trigger the form to submit",
@@ -198,7 +198,7 @@ The `useForm` hook returns an object with the following properties:
198198
],
199199
[
200200
{
201-
value: <strong><code>dispatchFields</code></strong>,
201+
value: `<strong><code>dispatchFields</code></strong>`,
202202
},
203203
{
204204
value: "Dispatch actions to the form field state",
@@ -209,7 +209,7 @@ The `useForm` hook returns an object with the following properties:
209209
],
210210
[
211211
{
212-
value: <strong><code>validateForm</code></strong>,
212+
value: `<strong><code>validateForm</code></strong>`,
213213
},
214214
{
215215
value: "Trigger a validation of the form state",
@@ -220,18 +220,18 @@ The `useForm` hook returns an object with the following properties:
220220
],
221221
[
222222
{
223-
value: <strong><code>createFormData</code></strong>,
223+
value: `<strong><code>createFormData</code></strong>`,
224224
},
225225
{
226-
value: <>Create a <code>multipart/form-data</code> object from the current form's state</>,
226+
value: `<>Create a <code>multipart/form-data</code> object from the current form's state</>`,
227227
},
228228
{
229229
value: ''
230230
}
231231
],
232232
[
233233
{
234-
value: <strong><code>disabled</code></strong>,
234+
value: `<strong><code>disabled</code></strong>`,
235235
},
236236
{
237237
value: "Boolean denoting whether or not the form is disabled",
@@ -242,7 +242,7 @@ The `useForm` hook returns an object with the following properties:
242242
],
243243
[
244244
{
245-
value: <strong><code>getFields</code></strong>,
245+
value: `<strong><code>getFields</code></strong>`,
246246
},
247247
{
248248
value: 'Gets all fields from state',
@@ -253,7 +253,7 @@ The `useForm` hook returns an object with the following properties:
253253
],
254254
[
255255
{
256-
value: <strong><code>getField</code></strong>,
256+
value: `<strong><code>getField</code></strong>`,
257257
},
258258
{
259259
value: 'Gets a single field from state by path',
@@ -264,7 +264,7 @@ The `useForm` hook returns an object with the following properties:
264264
],
265265
[
266266
{
267-
value: <strong><code>getData</code></strong>,
267+
value: `<strong><code>getData</code></strong>`,
268268
},
269269
{
270270
value: 'Returns the data stored in the form',
@@ -275,7 +275,7 @@ The `useForm` hook returns an object with the following properties:
275275
],
276276
[
277277
{
278-
value: <strong><code>getSiblingData</code></strong>,
278+
value: `<strong><code>getSiblingData</code></strong>`,
279279
},
280280
{
281281
value: 'Returns form sibling data for the given field path',
@@ -286,40 +286,40 @@ The `useForm` hook returns an object with the following properties:
286286
],
287287
[
288288
{
289-
value: <strong><code>setModified</code></strong>,
289+
value: `<strong><code>setModified</code></strong>`,
290290
},
291291
{
292-
value: <>Set the form\'s <code>modified</code> state</>,
292+
value: `<>Set the form\'s <code>modified</code> state</>`,
293293
},
294294
{
295295
value: '',
296296
},
297297
],
298298
[
299299
{
300-
value: <strong><code>setProcessing</code></strong>,
300+
value: `<strong><code>setProcessing</code></strong>`,
301301
},
302302
{
303-
value: <>Set the form\'s <code>processing</code> state</>,
303+
value: `<>Set the form\'s <code>processing</code> state</>`,
304304
},
305305
{
306306
value: '',
307307
},
308308
],
309309
[
310310
{
311-
value: <strong><code>setSubmitted</code></strong>,
311+
value: `<strong><code>setSubmitted</code></strong>`,
312312
},
313313
{
314-
value: <>Set the form\'s <code>submitted</code> state</>,
314+
value: `<>Set the form\'s <code>submitted</code> state</>`,
315315
},
316316
{
317317
value: '',
318318
},
319319
],
320320
[
321321
{
322-
value: <strong><code>formRef</code></strong>,
322+
value: `<strong><code>formRef</code></strong>`,
323323
},
324324
{
325325
value: 'The ref from the form HTML element',
@@ -330,7 +330,7 @@ The `useForm` hook returns an object with the following properties:
330330
],
331331
[
332332
{
333-
value: <strong><code>reset</code></strong>,
333+
value: `<strong><code>reset</code></strong>`,
334334
},
335335
{
336336
value: 'Method to reset the form to its initial state',
@@ -341,7 +341,7 @@ The `useForm` hook returns an object with the following properties:
341341
],
342342
[
343343
{
344-
value: <strong><code>addFieldRow</code></strong>,
344+
value: `<strong><code>addFieldRow</code></strong>`,
345345
},
346346
{
347347
value: "Method to add a row on an array or block field",
@@ -350,7 +350,7 @@ The `useForm` hook returns an object with the following properties:
350350
drawerTitle: 'addFieldRow',
351351
drawerDescription: 'A useful method to programmatically add a row to an array or block field.',
352352
drawerSlug: 'addFieldRow',
353-
drawerContent: (
353+
drawerContent: `
354354
<>
355355
<TableWithDrawers
356356
columns={[
@@ -392,7 +392,7 @@ The `useForm` hook returns an object with the following properties:
392392
{' '}
393393
394394
<pre>
395-
{`import { useForm } from "payload/components/forms";
395+
{\`import { useForm } from "payload/components/forms";
396396
397397
export const CustomArrayManager = () => {
398398
const { addFieldRow } = useForm()
@@ -415,12 +415,12 @@ export const CustomArrayManager = () => {
415415
Add Row
416416
</button>
417417
)
418-
}`}
418+
}\`}
419419
</pre>
420420
421421
<p>An example config to go along with the Custom Component</p>
422422
<pre>
423-
{`const ExampleCollection = {
423+
{\`const ExampleCollection = {
424424
slug: "example-collection",
425425
fields: [
426426
{
@@ -443,15 +443,15 @@ export const CustomArrayManager = () => {
443443
},
444444
},
445445
],
446-
}`}
446+
}\`}
447447
</pre>
448448
</>
449-
)
449+
`
450450
}
451451
],
452452
[
453453
{
454-
value: <strong><code>removeFieldRow</code></strong>,
454+
value: `<strong><code>removeFieldRow</code></strong>`,
455455
},
456456
{
457457
value: "Method to remove a row from an array or block field",
@@ -460,7 +460,7 @@ export const CustomArrayManager = () => {
460460
drawerTitle: 'removeFieldRow',
461461
drawerDescription: 'A useful method to programmatically remove a row from an array or block field.',
462462
drawerSlug: 'removeFieldRow',
463-
drawerContent: (
463+
drawerContent: `
464464
<>
465465
<TableWithDrawers
466466
columns={[
@@ -494,7 +494,7 @@ export const CustomArrayManager = () => {
494494
{' '}
495495
496496
<pre>
497-
{`import { useForm } from "payload/components/forms";
497+
{\`import { useForm } from "payload/components/forms";
498498
499499
export const CustomArrayManager = () => {
500500
const { removeFieldRow } = useForm()
@@ -512,12 +512,12 @@ export const CustomArrayManager = () => {
512512
Remove Row
513513
</button>
514514
)
515-
}`}
515+
}\`}
516516
</pre>
517517
518518
<p>An example config to go along with the Custom Component</p>
519519
<pre>
520-
{`const ExampleCollection = {
520+
{\`const ExampleCollection = {
521521
slug: "example-collection",
522522
fields: [
523523
{
@@ -540,15 +540,15 @@ export const CustomArrayManager = () => {
540540
},
541541
},
542542
],
543-
}`}
543+
}\`}
544544
</pre>
545545
</>
546-
)
546+
`
547547
}
548548
],
549549
[
550550
{
551-
value: <strong><code>replaceFieldRow</code></strong>,
551+
value: `<strong><code>replaceFieldRow</code></strong>`,
552552
},
553553
{
554554
value: "Method to replace a row from an array or block field",
@@ -557,7 +557,7 @@ export const CustomArrayManager = () => {
557557
drawerTitle: 'replaceFieldRow',
558558
drawerDescription: 'A useful method to programmatically replace a row from an array or block field.',
559559
drawerSlug: 'replaceFieldRow',
560-
drawerContent: (
560+
drawerContent: `
561561
<>
562562
<TableWithDrawers
563563
columns={[
@@ -599,7 +599,7 @@ export const CustomArrayManager = () => {
599599
{' '}
600600
601601
<pre>
602-
{`import { useForm } from "payload/components/forms";
602+
{\`import { useForm } from "payload/components/forms";
603603
604604
export const CustomArrayManager = () => {
605605
const { replaceFieldRow } = useForm()
@@ -622,12 +622,12 @@ export const CustomArrayManager = () => {
622622
Replace Row
623623
</button>
624624
)
625-
}`}
625+
}\`}
626626
</pre>
627627
628628
<p>An example config to go along with the Custom Component</p>
629629
<pre>
630-
{`const ExampleCollection = {
630+
{\`const ExampleCollection = {
631631
slug: "example-collection",
632632
fields: [
633633
{
@@ -650,10 +650,10 @@ export const CustomArrayManager = () => {
650650
},
651651
},
652652
],
653-
}`}
653+
}\`}
654654
</pre>
655655
</>
656-
)
656+
`
657657
}
658658
],
659659
]}

docs/rest-api/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Note: Collection slugs must be formatted in kebab-case
5050
updatedAt: "2023-04-27T11:27:32.419Z",
5151
},
5252
},
53-
drawerContent: (
53+
drawerContent: `
5454
<>
5555
<h6>Additional <code>find</code> query parameters</h6>
5656
The <code>find</code> endpoint supports the following additional query parameters:
@@ -72,7 +72,7 @@ Note: Collection slugs must be formatted in kebab-case
7272
</li>
7373
</ul>
7474
</>
75-
),
75+
`,
7676
},
7777
},
7878
{

0 commit comments

Comments
 (0)