Skip to content

Commit bb0c8a8

Browse files
authored
docs: fix incorrect mdx (#10201)
1 parent fad4ee6 commit bb0c8a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+239
-240
lines changed

docs/access-control/collections.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const CollectionWithReadAccess: CollectionConfig = {
122122
```
123123

124124
<Banner type="success">
125-
<strong>Tip:</strong>
125+
**Tip:**
126126
Return a [Query](../queries/overview) to limit the Documents to only those that match the constraint. This can be helpful to restrict users' access to specific Documents. [More details](../queries/overview).
127127
</Banner>
128128

@@ -176,7 +176,7 @@ export const CollectionWithUpdateAccess: CollectionConfig = {
176176
```
177177

178178
<Banner type="success">
179-
<strong>Tip:</strong>
179+
**Tip:**
180180
Return a [Query](../queries/overview) to limit the Documents to only those that match the constraint. This can be helpful to restrict users' access to specific Documents. [More details](../queries/overview).
181181
</Banner>
182182

docs/access-control/fields.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const FieldWithAccessControl: Field = {
2222
```
2323

2424
<Banner type="warning">
25-
<strong>Note:</strong>
25+
**Note:**
2626
Field Access Controls does not support returning [Query](../queries/overview) constraints like [Collection Access Control](./collections) does.
2727
</Banner>
2828

docs/access-control/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const defaultPayloadAccess = ({ req: { user } }) => {
4242
```
4343

4444
<Banner type="warning">
45-
<strong>Important:</strong>
45+
**Important:**
4646
In the [Local API](../local-api/overview), all Access Control is _skipped_ by default. This allows your server to have full control over your application. To opt back in, you can set the `overrideAccess` option to `false` in your requests.
4747
</Banner>
4848

@@ -53,7 +53,7 @@ The Admin Panel responds dynamically to your changes to Access Control. For exam
5353
To accomplish this, Payload exposes the [Access Operation](../authentication/operations#access). Upon login, Payload executes each Access Control function at the top level, across all Collections, Globals, and Fields, and returns a response that contains a reflection of what the currently authenticated user can do within your application.
5454

5555
<Banner type="warning">
56-
<strong>Important:</strong>
56+
**Important:**
5757
When your access control functions are executed via the [Access Operation](../authentication/operations#access), the `id` and `data` arguments will be `undefined`. This is because Payload is executing your functions without referencing a specific Document.
5858
</Banner>
5959

docs/admin/collections.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The following options are available:
7979
| **`views`** | Override or create new views within the Admin Panel. [More details](./views). |
8080

8181
<Banner type="success">
82-
<strong>Note:</strong>
82+
**Note:**
8383
For details on how to build Custom Components, see [Building Custom Components](./components#building-custom-components).
8484
</Banner>
8585

@@ -124,7 +124,7 @@ preview: (doc, { req }) => `${req.protocol}//${req.host}/${doc.slug}` // highlig
124124
```
125125

126126
<Banner type="success">
127-
<strong>Note:</strong>
127+
**Note:**
128128
For fully working example of this, check of the official [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview) in the [Examples Directory](https://github.com/payloadcms/payload/tree/main/examples).
129129
</Banner>
130130

@@ -177,6 +177,6 @@ export const Posts: CollectionConfig = {
177177
```
178178

179179
<Banner type="warning">
180-
<strong>Tip:</strong>
180+
**Tip:**
181181
If you are adding `listSearchableFields`, make sure you index each of these fields so your admin queries can remain performant.
182182
</Banner>

docs/admin/components.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The Payload [Admin Panel](./overview) is designed to be as minimal and straightf
1111
All Custom Components in Payload are [React Server Components](https://react.dev/reference/rsc/server-components) by default. This enables the use of the [Local API](../local-api/overview) directly on the front-end. Custom Components are available for nearly every part of the Admin Panel for extreme granularity and control.
1212

1313
<Banner type="success">
14-
<strong>Note:</strong>
14+
**Note:**
1515
Client Components continue to be fully supported. To use Client Components in your app, simply include the `use client` directive. Payload will automatically detect and remove all default, [non-serializable props](https://react.dev/reference/rsc/use-client#serializable-types) before rendering your component. [More details](#client-components).
1616
</Banner>
1717

@@ -46,7 +46,7 @@ const config = buildConfig({
4646
```
4747

4848
<Banner type="success">
49-
<strong>Note:</strong>
49+
**Note:**
5050
All Custom Components can be either Server Components or Client Components, depending on the presence of the `use client` directive at the top of the file.
5151
</Banner>
5252

@@ -184,7 +184,7 @@ Each Custom Component receives the following props by default:
184184
| `i18n` | The [i18n](../configuration/i18n) object. |
185185
186186
<Banner type="warning">
187-
<strong>Reminder:</strong>
187+
**Reminder:**
188188
All Custom Components also receive various other props that are specific component being rendered. See [Root Components](#root-components), [Collection Components](./collections#custom-components), [Global Components](./globals#custom-components), or [Field Components](./fields#custom-components) for a complete list of all default props per component.
189189
</Banner>
190190
@@ -243,7 +243,7 @@ export const MyClientComponent: React.FC = () => {
243243
```
244244
245245
<Banner type="warning">
246-
<strong>Reminder:</strong>
246+
**Reminder:**
247247
Client Components cannot be passed [non-serializable props](https://react.dev/reference/rsc/use-client#serializable-types). If you are rendering your Client Component _from within_ a Server Component, ensure that its props are serializable.
248248
</Banner>
249249
@@ -455,7 +455,7 @@ Payload also exports its [SCSS](https://sass-lang.com) library for reuse which i
455455
```
456456

457457
<Banner type="success">
458-
<strong>Note:</strong>
458+
**Note:**
459459
You can also drill into Payload's own component styles, or easily apply global, app-wide CSS. More on that [here](./customizing-css).
460460
</Banner>
461461

@@ -503,7 +503,7 @@ The following options are available:
503503
| **`views`** | Override or create new views within the Admin Panel. [More details](./views). |
504504

505505
<Banner type="success">
506-
<strong>Note:</strong>
506+
**Note:**
507507
You can also use set [Collection Components](./collections#custom-components) and [Global Components](./globals#custom-components) in their respective configs.
508508
</Banner>
509509

@@ -546,5 +546,5 @@ export const useMyCustomContext = () => useContext(MyCustomContext)
546546
```
547547

548548
<Banner type="warning">
549-
<strong>Reminder:</strong>React Context exists only within Client Components. This means they must include the `use client` directive at the top of their files and cannot contain server-only code. To use a Server Component here, simply _wrap_ your Client Component with it.
549+
**Reminder:**React Context exists only within Client Components. This means they must include the `use client` directive at the top of their files and cannot contain server-only code. To use a Server Component here, simply _wrap_ your Client Component with it.
550550
</Banner>

docs/admin/customizing-css.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Here is an example of how you might target the Dashboard View and change the bac
2929
```
3030

3131
<Banner type="warning">
32-
<strong>Note:</strong>
32+
**Note:**
3333
If you are building [Custom Components](./components), it is best to import your own stylesheets directly into your components, rather than using the global stylesheet. You can continue to use the [CSS library](#css-library) as needed.
3434
</Banner>
3535

@@ -77,7 +77,7 @@ The following variables are defined and can be overridden:
7777
For an up-to-date, comprehensive list of all available variables, please refer to the [Source Code](https://github.com/payloadcms/payload/blob/main/packages/ui/src/scss).
7878

7979
<Banner type="warning">
80-
<strong>Warning:</strong>
80+
**Warning:**
8181
If you're overriding colors or theme elevations, make sure to consider how [your changes will affect dark mode](#dark-mode).
8282
</Banner>
8383

docs/admin/fields.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ keywords:
1111
For example, your app might need to render a specific interface that Payload does not inherently support, such as a color picker. To do this, you could replace the default [Text Field](../fields/text) input with your own user-friendly component that formats the data into a valid color value.
1212

1313
<Banner type="success">
14-
<strong>Tip:</strong>
14+
**Tip:**
1515
Don't see a built-in field type that you need? Build it! Using a combination of [Field Validations](../fields/overview#validation)
1616
and [Custom Components](./components), you can override the entirety of how a component functions within the [Admin Panel](./overview) to effectively create your own field type.
1717
</Banner>
@@ -87,7 +87,7 @@ export const MyCollectionConfig: SanitizedCollectionConfig = {
8787
```
8888

8989
<Banner type="warning">
90-
<strong>Reminder:</strong>
90+
**Reminder:**
9191
To replace the Field Description with a [Custom Component](./components), use the `admin.components.Description` property. [More details](#description).
9292
</Banner>
9393

@@ -122,7 +122,7 @@ All Description Functions receive the following arguments:
122122
| **`t`** | The `t` function used to internationalize the Admin Panel. [More details](../configuration/i18n) |
123123

124124
<Banner type="info">
125-
<strong>Note:</strong>
125+
**Note:**
126126
If you need to subscribe to live updates within your form, use a Description Component instead. [More details](#description).
127127
</Banner>
128128

docs/admin/globals.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The following options are available:
6565
| **`views`** | Override or create new views within the Admin Panel. [More details](./views). |
6666

6767
<Banner type="success">
68-
<strong>Note:</strong>
68+
**Note:**
6969
For details on how to build Custom Components, see [Building Custom Components](./components#building-custom-components).
7070
</Banner>
7171

@@ -102,6 +102,6 @@ The preview function receives two arguments:
102102
| **`ctx`** | An object containing `locale` and `token` properties. The `token` is the currently logged-in user's JWT. |
103103

104104
<Banner type="success">
105-
<strong>Note:</strong>
105+
**Note:**
106106
For fully working example of this, check of the official [Draft Preview Example](https://github.com/payloadcms/payload/tree/main/examples/draft-preview) in the [Examples Directory](https://github.com/payloadcms/payload/tree/main/examples).
107107
</Banner>

docs/admin/hooks.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords: admin, components, custom, documentation, Content Management System, c
99
Payload provides a variety of powerful [React Hooks](https://react.dev/reference/react-dom/hooks) that can be used within your own [Custom Components](./components), such as [Custom Fields](./fields). With them, you can interface with Payload itself to build just about any type of complex customization you can think of.
1010

1111
<Banner type="warning">
12-
<strong>Reminder:</strong>
12+
**Reminder:**
1313
All Custom Components are [React Server Components](https://react.dev/reference/rsc/server-components) by default. Hooks, on the other hand, are only available in client-side environments. To use hooks, [ensure your component is a client component](./components#client-components).
1414
</Banner>
1515

@@ -78,7 +78,7 @@ type FieldType<T> = {
7878
There are times when a custom field component needs to have access to data from other fields, and you have a few options to do so. The `useFormFields` hook is a powerful and highly performant way to retrieve a form's field state, as well as to retrieve the `dispatchFields` method, which can be helpful for setting other fields' form states from anywhere within a form.
7979
8080
<Banner type="success">
81-
<strong>This hook is great for retrieving only certain fields from form state</strong> because it
81+
**This hook is great for retrieving only certain fields from form state** because it
8282
ensures that it will only cause a rerender when the items that you ask for change.
8383
</Banner>
8484
@@ -157,8 +157,8 @@ To see types for each action supported within the `dispatchFields` hook, check o
157157
The `useForm` hook can be used to interact with the form itself, and sends back many methods that can be used to reactively fetch form state without causing rerenders within your components each time a field is changed. This is useful if you have action-based callbacks that your components fire, and need to interact with form state _based on a user action_.
158158

159159
<Banner type="warning">
160-
<strong>Warning:</strong>
161-
<br />
160+
**Warning:**
161+
162162
This hook is optimized to avoid causing rerenders when fields change, and as such, its `fields`
163163
property will be out of date. You should only leverage this hook if you need to perform actions
164164
against the form in response to your users' actions. Do not rely on its returned "fields" as being

docs/admin/locked-documents.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ When a user starts editing a document, Payload locks it for that user. If anothe
2020

2121
The lock will automatically expire after a set period of inactivity, configurable using the `duration` property in the `lockDocuments` configuration, after which others can resume editing.
2222

23-
<Banner type="info"> <strong>Note:</strong> If your application does not require document locking, you can disable this feature for any collection or global by setting the <code>lockDocuments</code> property to <code>false</code>. </Banner>
23+
<Banner type="info"> **Note:** If your application does not require document locking, you can disable this feature for any collection or global by setting the `lockDocuments` property to `false`. </Banner>
2424

2525
### Config Options
2626

2727
The `lockDocuments` property exists on both the Collection Config and the Global Config. Document locking is enabled by default, but you can customize the lock duration or turn off the feature for any collection or global.
2828

29-
Heres an example configuration for document locking:
29+
Here's an example configuration for document locking:
3030

3131
```ts
3232
import type { CollectionConfig } from 'payload'

docs/admin/metadata.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The following options are available for Root Metadata:
5757
| **`titleSuffix`** | `string` | A suffix to append to the end of the title of every page. Defaults to "- Payload". |
5858

5959
<Banner type="success">
60-
<strong>Reminder:</strong>
60+
**Reminder:**
6161
These are the _root-level_ options for the Admin Panel. You can also customize [Collection Metadata](./collections), [Global Metadata](./globals), and [Document Metadata](./documents) in their respective configs.
6262
</Banner>
6363

docs/admin/overview.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ As shown above, all Payload routes are nested within the `(payload)` route group
5656
The `admin` directory contains all the _pages_ related to the interface itself, whereas the `api` and `graphql` directories contains all the _routes_ related to the [REST API](../rest-api/overview) and [GraphQL API](../graphql/overview). All admin routes are [easily configurable](#customizing-routes) to meet your application's exact requirements.
5757

5858
<Banner type="warning">
59-
<strong>Note:</strong>
59+
**Note:**
6060
If you don't use the [REST API](../rest/overview) or [GraphQL API](../graphql/overview), you can delete the [Next.js files corresponding to those routes](../admin/overview#project-structure), however, the overhead of this API is completely constrained to these endpoints, and will not slow down or affect Payload outside of the endpoints.
6161
</Banner>
6262

@@ -103,7 +103,7 @@ The following options are available:
103103
| **`user`** | The `slug` of the Collection that you want to allow to login to the Admin Panel. [More details](#the-admin-user-collection). |
104104

105105
<Banner type="success">
106-
<strong>Reminder:</strong>
106+
**Reminder:**
107107
These are the _root-level_ options for the Admin Panel. You can also customize [Collection Admin Options](./collections) and [Global Admin Options](./globals) through their respective `admin` keys.
108108
</Banner>
109109

@@ -123,8 +123,8 @@ const config = buildConfig({
123123
```
124124

125125
<Banner type="warning">
126-
<strong>Important:</strong>
127-
<br />
126+
**Important:**
127+
128128
The Admin Panel can only be used by a single auth-enabled Collection. To enable authentication for a Collection, simply set `auth: true` in the Collection's configuration. See [Authentication](../authentication/overview) for more information.
129129
</Banner>
130130

@@ -177,7 +177,7 @@ The following options are available:
177177
| `graphQLPlayground` | `/graphql-playground` | The GraphQL Playground. |
178178

179179
<Banner type="success">
180-
<strong>Tip:</strong>
180+
**Tip:**
181181
You can easily add _new_ routes to the Admin Panel through [Custom Endpoints](../rest-api/overview#custom-endpoints) and [Custom Views](./views).
182182
</Banner>
183183

@@ -195,7 +195,7 @@ app/
195195
```
196196

197197
<Banner type="warning">
198-
<strong>Note:</strong>
198+
**Note:**
199199
If you set Root-level Routes _before_ auto-generating the Admin Panel via `create-payload-app`, your [Project Structure](#project-structure) will already be set up correctly.
200200
</Banner>
201201

@@ -232,7 +232,7 @@ The following options are available:
232232
| `unauthorized` | `/unauthorized` | The unauthorized page. |
233233

234234
<Banner type="success">
235-
<strong>Note:</strong>
235+
**Note:**
236236
You can also swap out entire _views_ out for your own, using the `admin.views` property of the Payload Config. See [Custom Views](./views) for more information.
237237
</Banner>
238238

docs/admin/preferences.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Out of the box, Payload handles the persistence of your users' preferences in a
1616
1. The last-known state of the `Nav` component, etc.
1717

1818
<Banner type="warning">
19-
<strong>Important:</strong>
20-
<br />
19+
**Important:**
20+
2121
All preferences are stored on an individual user basis. Payload automatically recognizes the user
2222
that is reading or setting a preference via all provided authentication methods.
2323
</Banner>

0 commit comments

Comments
 (0)