Skip to content

Commit

Permalink
fix(docs): use defineConfig in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrees committed Nov 2, 2022
1 parent 856c4bd commit c5e62ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ This plugin aims to be OS-like in that you can select and move multiple document
A Sanity Studio with [Desk Structure](https://www.sanity.io/docs/structure-builder-introduction) configured:

```ts
import {createConfig} from "sanity";
import {defineConfig} from "sanity";
import {deskTool, StructureBuilder} from "sanity/desk";

export default createConfig({
export default defineConfig({
//...
plugins: [
deskTool({
Expand Down Expand Up @@ -54,11 +54,11 @@ The config parameter requires `type`, `S` and `context`. It also accepts `title`
`S` and `context` are available in desk-tool structure callback, and should be forwarded as is:

```ts
import {createConfig} from "sanity";
import {defineConfig} from "sanity";
import {deskTool, StructureBuilder} from "sanity/desk";
import {orderableDocumentListDeskItem} from '@sanity/orderable-document-list'

export default createConfig({
export default defineConfig({
//...
plugins: [
deskTool({
Expand Down Expand Up @@ -111,11 +111,11 @@ You cannot override the `name`, `type` or `initialValue` attributes.

```js
// sanity.config.js
import {createConfig} from "sanity";
import {defineConfig} from "sanity";
import {deskTool, StructureBuilder} from "sanity/desk";
import {orderableDocumentListDeskItem} from '@sanity/orderable-document-list'

export default createConfig({
export default defineConfig({
//...
plugins: [
deskTool({structure: (S, context) => {/* snip */}})
Expand Down

0 comments on commit c5e62ed

Please # to comment.