diff --git a/storybook/preview.js b/storybook/preview.js
index 46f9702..e57dbc5 100644
--- a/storybook/preview.js
+++ b/storybook/preview.js
@@ -14,65 +14,68 @@ import webqueueTheme from "../src/theme";
* @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" }
- ],
+ 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" }
+ ],
+ },
},
- },
};
/**
- * Array
+ * Array of functions to wrap all stories.
* @type {Array}
* @see https://storybook.js.org/docs/react/writing-stories/decorators
*/
export const decorators = [
- // Provide custom webqueue2 Theme
- (Story, context) => {
- const theme = webqueueTheme(context.globals.theme);
- return (
-
-
-
- );
- },
- // Provide Item context
- (Story) => (
-
-
-
- ),
+ // Provide custom webqueue2 Theme
+ (Story, context) => {
+ const theme = webqueueTheme(context.globals.theme);
+ return (
+
+
+
+ );
+ },
+
+ // Provide Item context
+ (Story) => (
+
+
+
+ ),
];
-/**Set of static metadata for a story. Is also used to define the sort order of the stories and backgrounds for every story.
+/** Naming and Sorting Options
* @type {Object}
+ * @see https://storybook.js.org/docs/react/writing-stories/naming-components-and-hierarchy
*/
export const parameters = {
- actions: { argTypesRegex: "^on[A-Z].*" },
- options: {
- storySort: {
- method: 'alphabetical',
- order: ['Introduction', 'Components']
+
+ actions: { argTypesRegex: "^on[A-Z].*" },
+ options: {
+ storySort: {
+ method: 'alphabetical',
+ order: ['Introduction', 'Components']
+ },
+ },
+ backgrounds: {
+ default: 'light',
+ values: [
+ {
+ name: 'light',
+ value: '#f5f5f5',
+ },
+ {
+ name: 'dark',
+ value: '#333333'
+ },
+ ],
},
- },
- backgrounds: {
- default: 'light',
- values: [
- {
- name: 'light',
- value: '#f5f5f5',
- },
- {
- name: 'dark',
- value: '#333333'
- },
- ],
- },
}
\ No newline at end of file