How to use @sanity/storybook - 1 common examples

To help you get started, we’ve selected a few @sanity/storybook examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity / packages / @sanity / cli / src / commands / start / startCommand.js View on Github external
}
      })
    })

    const storyConfig = sanityConfig.get('storybook')
    if (storyConfig) {
      const plugins = sanityConfig.get('plugins') || []
      if (plugins.indexOf('@sanity/storybook') === -1) {
        throw new Error(
          '`@sanity/storybook` is missing from `plugins` array. '
          + 'Either add it as a dependency and plugin, or remove the '
          + '`storybook` section of your projects `sanity.json`.'
        )
      }

      listeners.push(storyBook(storyConfig))
    }

    return reinitializePluginConfigs({rootDir: options.rootDir, output})
      .then(listenPromise)
      .catch(getGracefulDeathHandler(config))
  }
}

@sanity/storybook

Sanity plugin for running react-storybook in a Sanity studio

MIT
Latest version published 3 years ago

Package Health Score

69 / 100
Full package analysis

Popular @sanity/storybook functions