From 79e643e72e686e08ab26749526501369e70f57bc Mon Sep 17 00:00:00 2001 From: Justin Campbell Date: Mon, 5 Apr 2021 18:03:04 -0400 Subject: [PATCH] Add docs link, fix formatting --- storybook/preview.js | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/storybook/preview.js b/storybook/preview.js index e6533a9..516a6de 100644 --- a/storybook/preview.js +++ b/storybook/preview.js @@ -1,4 +1,8 @@ -/**Set globals imputs for ALL stories. Globals can only be defined here. */ +/** + * Config file to control how stories are rendered in the Canvas. + * See: https://storybook.js.org/docs/react/configure/overview#configure-story-rendering + */ + import React from "react"; import ItemProvider from '../src/components/ItemProvider'; import { ThemeProvider } from "@material-ui/core/styles"; @@ -8,16 +12,16 @@ import webqueueTheme from "../src/theme"; * Adds a toolbar item that allow users to toggle dark mode on and off. * @type {Object} */ -export const globalTypes = { - theme: { - name: 'Set Dark Mode', - description: 'Global theme for components', - defaultValue: false, - toolbar: { - icon: 'mirror', - items: [ - { value: true, title: "Dark Mode active", icon: "contrast" }, - { value: false, title: "Dark Mode off", icon: "switchalt" } + export const globalTypes = { + theme: { + name: 'Set Dark Mode', + description: 'Global theme for components', + defaultValue: false, + toolbar: { + icon: 'mirror', + items: [ + { value: true, title: "Dark Mode active", icon: "contrast" }, + { value: false, title: "Dark Mode off", icon: "switchalt" } ], }, }, @@ -25,7 +29,7 @@ export const globalTypes = { /**Defines global theme ALL stories stories. * * @type {Object | Function} - */ + */ const withThemeProvider = (Story, context) => { const theme = webqueueTheme(context.globals.theme); return ( @@ -35,9 +39,9 @@ const withThemeProvider = (Story, context) => { ) } /** - * Wraps all sotrys in the defined decorators. - * @type {Array[]} - */ + * Wraps all sotrys in the defined decorators. + * @type {Array[]} + */ export const decorators = [ (Story) => (