Skip to content

Commit

Permalink
Changed default export to use payloadWorkflow instead of PayloadWorkf…
Browse files Browse the repository at this point in the history
…low to match other plugin imports
  • Loading branch information
DennisSnijder committed Jul 2, 2023
1 parent bfc38b8 commit e987db5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ $ yarn add payload-workflow

## Basic usage
```typescript
import { PayloadWorkflow } from 'payload-workflow';
import { payloadWorkflow } from 'payload-workflow';

const config = buildConfig({
collections: [...],
plugins: [
PayloadWorkflow({
payloadWorkflow({
'my-collection-slug': {
statuses: [
{value: 'draft', label: 'Draft'},
Expand Down
4 changes: 2 additions & 2 deletions dev/src/payload.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Posts from './collections/Posts';
import Tags from './collections/Tags';
import Users from './collections/Users';
import Media from './collections/Media';
import { PayloadWorkflow } from "../../src/index";
import { payloadWorkflow } from "../../src/index";

export default buildConfig({
serverURL: 'http://localhost:3000',
Expand Down Expand Up @@ -33,7 +33,7 @@ export default buildConfig({
Media,
],
plugins: [
PayloadWorkflow({
payloadWorkflow({
[Posts.slug]: {
statuses: [
{value: 'draft', label: 'Draft'},
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const extendCollectionConfig = (
}
});

export const PayloadWorkflow = (pluginConfig: Record<string, PluginCollectionConfig>): Plugin =>
export const payloadWorkflow = (pluginConfig: Record<string, PluginCollectionConfig>): Plugin =>
(incomingConfig: Config): Config => {

return {
Expand Down

0 comments on commit e987db5

Please sign in to comment.