Skip to content

Commit

Permalink
chore: update readme with mutator behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolink committed Feb 12, 2024
1 parent e913e86 commit 4120da8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ export default {
#### `withEntryArgMutator`

When you want to modify the loaded entry data, you can use the `withEntryArgMutator` decorator.
By default, the entry will be populated under `args.contentful_entry`. You can use this decorator to modify the loaded entry data before it is passed to your component.
The loaded the entry will be provided as `args.contentful_entry`.
You can use this decorator to modify the loaded entry data before it is passed to your component to match your component props.
WHen used as plugin, the default behavour is to populate all `fields` as top-level args to the story.

```ts
import {withContentful, withEntryArgMutator} from 'storybook-addon-contentful-preview';
Expand Down

0 comments on commit 4120da8

Please sign in to comment.