Skip to content

Commit

Permalink
docs: add adaptors to README
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Jul 5, 2023
1 parent 2cda4dd commit 333c177
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ A `Field` represents a user input field shown in the Puck interface.
- **options** (`object[]`): array of items to render for select-type inputs
- **label** (`string`)
- **value** (`string`)
- **adaptor** (`Adaptor`): Content adaptor if using the `external` input type
- **adaptorParams** (`object`): Paramaters passed to the adaptor

### `Data`

Expand All @@ -169,6 +171,15 @@ The `Data` object stores the state of a page.
- **props** (object):
- **[prop]** (string): User defined data from component fields

### `Adaptor`

An `Adaptor` can be used to load content from an external content repository, like Strapi.js.

- **name** (`string`): The human-readable name of the adaptor
- **fetchList** (`(adaptorParams: object) => object`): Fetch a list of content and return an array

> NB Using an adaptor on the reserved field name `_data` will spread the resulting data over your object, and lock the overridden fields.
### `Plugin`

Plugins that can be used to enhance Puck.
Expand Down

0 comments on commit 333c177

Please sign in to comment.