Skip to content

Commit

Permalink
docs: correctly escape backticks (#10216)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioGr authored Dec 28, 2024
1 parent 67db04c commit 3278f45
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
64 changes: 32 additions & 32 deletions docs/admin/hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -359,23 +359,23 @@ The `useForm` hook returns an object with the following properties:
rows={[
[
{
value: "**\`path\`**",
value: "**\\\`path\\\`**",
},
{
value: "The path to the array or block field",
},
],
[
{
value: "**\`rowIndex\`**",
value: "**\\\`rowIndex\\\`**",
},
{
value: "The index of the row to add. If omitted, the row will be added to the end of the array.",
},
],
[
{
value: "**\`data<\`**",
value: "**\\\`data<\\\`**",
},
{
value: "The data to add to the row",
Expand All @@ -385,8 +385,8 @@ The `useForm` hook returns an object with the following properties:
/>
\`\`\`tsx
{\`import { useForm } from "payload/components/forms";
\\\`\\\`\\\`tsx
{\\\`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
const { addFieldRow } = useForm()
Expand All @@ -409,13 +409,13 @@ export const CustomArrayManager = () => {
Add Row
</button>
)
}\`}
\`\`\`
}\\\`}
\\\`\\\`\\\`
An example config to go along with the Custom Component
\`\`\`tsx
{\`const ExampleCollection = {
\\\`\\\`\\\`tsx
{\\\`const ExampleCollection = {
slug: "example-collection",
fields: [
{
Expand All @@ -438,8 +438,8 @@ An example config to go along with the Custom Component
},
},
],
}\`}
\`\`\`
}\\\`}
\\\`\\\`\\\`
`
}
],
Expand All @@ -463,15 +463,15 @@ An example config to go along with the Custom Component
rows={[
[
{
value: "**\`path\`**",
value: "**\\\`path\\\`**",
},
{
value: "The path to the array or block field",
},
],
[
{
value: "**\`rowIndex\`**",
value: "**\\\`rowIndex\\\`**",
},
{
value: "The index of the row to remove",
Expand All @@ -482,8 +482,8 @@ An example config to go along with the Custom Component
\`\`\`tsx
{\`import { useForm } from "payload/components/forms";
\\\`\\\`\\\`tsx
{\\\`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
const { removeFieldRow } = useForm()
Expand All @@ -501,13 +501,13 @@ export const CustomArrayManager = () => {
Remove Row
</button>
)
}\`}
\`\`\`
}\\\`}
\\\`\\\`\\\`
An example config to go along with the Custom Component
\`\`\`tsx
{\`const ExampleCollection = {
\\\`\\\`\\\`tsx
{\\\`const ExampleCollection = {
slug: "example-collection",
fields: [
{
Expand All @@ -530,8 +530,8 @@ An example config to go along with the Custom Component
},
},
],
}\`}
\`\`\`
}\\\`}
\\\`\\\`\\\`
`
}
],
Expand All @@ -555,23 +555,23 @@ An example config to go along with the Custom Component
rows={[
[
{
value: "**\`path\`**",
value: "**\\\`path\\\`**",
},
{
value: "The path to the array or block field",
},
],
[
{
value: "**\`rowIndex\`**",
value: "**\\\`rowIndex\\\`**",
},
{
value: "The index of the row to replace",
},
],
[
{
value: "**\`data\`**",
value: "**\\\`data\\\`**",
},
{
value: "The data to replace within the row",
Expand All @@ -583,8 +583,8 @@ An example config to go along with the Custom Component
\`\`\`tsx
{\`import { useForm } from "payload/components/forms";
\\\`\\\`\\\`tsx
{\\\`import { useForm } from "payload/components/forms";
export const CustomArrayManager = () => {
const { replaceFieldRow } = useForm()
Expand All @@ -607,13 +607,13 @@ export const CustomArrayManager = () => {
Replace Row
</button>
)
}\`}
\`\`\`
}\\\`}
\\\`\\\`\\\`
An example config to go along with the Custom Component
\`\`\`tsx
{\`const ExampleCollection = {
\\\`\\\`\\\`tsx
{\\\`const ExampleCollection = {
slug: "example-collection",
fields: [
{
Expand All @@ -636,8 +636,8 @@ An example config to go along with the Custom Component
},
},
],
}\`}
\`\`\`
}\\\`}
\\\`\\\`\\\`
`
}
],
Expand Down
4 changes: 2 additions & 2 deletions docs/rest-api/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ Note: Collection slugs must be formatted in kebab-case
},
},
drawerContent: `
#### Additional `find` query parameters
#### Additional \\\`find\\\` query parameters
The `find` endpoint supports the following additional query parameters:
The \\\`find\\\` endpoint supports the following additional query parameters:
- [sort](/docs/queries/overview#sort) - sort by field
- [where](/docs/queries/overview) - pass a where query to constrain returned documents
Expand Down

0 comments on commit 3278f45

Please sign in to comment.