Skip to content

sanity-io/ui-workshop-plugin-sanity

Repository files navigation

@sanity/ui-workshop-plugin-sanity

Wrap your UI workshop in the Sanity context to test your Sanity-connected components.

# Install `@sanity/ui-workshop-plugin-sanity` as dev dependency
npm install @sanity/ui-workshop-plugin-sanity -D

# Install peer dependencies
npm install @sanity/icons @sanity/ui react react-dom styled-components

npm version

Basic usage

Add the plugin to your workshop.config.ts (or .js) in the root of your project:

import {defineConfig} from '@sanity/ui-workshop'
import {sanity} from '@sanity/ui-workshop-plugin-sanity'
import sanityConfig from './sanity.config'

export default defineConfig({
  title: 'My UI Workshop',
  plugins: [sanity({config: sanityConfig})],
})

License

MIT