Skip to content

Commit

Permalink
Annotate globalTypes, remove nonexistant properties
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Apr 5, 2021
1 parent 79e643e commit 9366880
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ import ItemProvider from '../src/components/ItemProvider';
import { ThemeProvider } from "@material-ui/core/styles";
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" }
/**
* Object defining toolbar controls.
* @type {Object}
* @see: https://storybook.js.org/docs/react/essentials/toolbars-and-globals#global-types-and-the-toolbar-annotation
*/
export const globalTypes = {
theme: {
name: 'Toggle Dark Mode',
description: 'Toggle between light and dark variants.',
defaultValue: false,
toolbar: {
icon: 'mirror',
items: [
{ value: true, title: "Dark Mode On" },
{ value: false, title: "Dark Mode Off" }
],
},
},
Expand Down

0 comments on commit 9366880

Please sign in to comment.