diff --git a/.storybook/preview.js b/.storybook/preview.js index cf44e79..ccc2100 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,9 +1,22 @@ -import React from "react"; +import React, { useState } from "react"; import ItemProvider from '../src/components/ItemProvider'; import { ThemeProvider } from "@material-ui/core/styles"; import webqueueTheme from "../src/theme"; -const theme = webqueueTheme(); +const theme = webqueueTheme(false); + +export const globalTypes = { + theme: { + name: 'Theme', + description: 'Global theme for components', + defaultValue: 'false', + toolbar: { + icon: 'mirror', + // array of plain string values or MenuItem shape (see below) + items: ["light", "dark"], + }, + }, +}; export const decorators = [ (Story) => ( @@ -11,9 +24,9 @@ export const decorators = [ ), - (Story) => ( + (Story, context) => ( - + ), ];