storybook-eol / storybook-addon-options

REPO/PACKAGE MOVED - Storybook UI Options Addon
https://github.com/storybooks/storybook/tree/master/addons/options
30 stars 7 forks source link

Specify different options based on environment #5

Closed kevinSuttle closed 8 years ago

kevinSuttle commented 8 years ago

I'm not sure if this is possible or the right place to ask, but I'd like different options for

Seems this is possible: https://getstorybook.io/docs/configurations/env-vars

kevinSuttle commented 8 years ago

Oh right:


if(process.env.NODE_ENV === 'development') {
  setOptions({
    name: 'Local development options',
    url: 'https://localhost:9001',
    goFullScreen: true,
    showLeftPanel: false,
    showSearchBox: false,
    showDownPanel: true,
    downPanelInRight: true,
  });
}

if(process.env.NODE_ENV === 'production') {
  setOptions({
    name: 'GHE Pages options',
    url: 'blah blah',
    goFullScreen: false,
    showLeftPanel: true,
    showSearchBox: true,
    showDownPanel: true,
    downPanelInRight: false,
  });
}
kevinSuttle commented 8 years ago

I am curious if the name and url params can be exposed in any useful ways, though.