diff --git a/.storybook/manager.js b/.storybook/manager.js
index 67a9d779b..2f227e369 100644
--- a/.storybook/manager.js
+++ b/.storybook/manager.js
@@ -5,4 +5,7 @@ import theme from './theme';
addons.setConfig({
panelPosition: 'right',
theme,
+ sidebar: {
+ showRoots: true
+ },
});
diff --git a/.storybook/stories/colors.stories.mdx b/.storybook/stories/colors.stories.mdx
index 562f791dd..75e6830bd 100644
--- a/.storybook/stories/colors.stories.mdx
+++ b/.storybook/stories/colors.stories.mdx
@@ -1,5 +1,4 @@
-import { Meta, ColorPalette, ColorItem, Story } from '@storybook/addon-docs/blocks';
-import { Box, COLOR, Heading2, Island, StatusLabel, TextBody } from '../../src';
+import { Meta } from '@storybook/addon-docs';
diff --git a/.storybook/stories/playground/forms.stories.js b/.storybook/stories/playground/forms.stories.js
index d269730d5..6493aa099 100644
--- a/.storybook/stories/playground/forms.stories.js
+++ b/.storybook/stories/playground/forms.stories.js
@@ -55,6 +55,4 @@ export const forms = () => {
);
};
-forms.story = {
- name: 'Form elements',
-};
+forms.storyName = 'Form elements';
diff --git a/.storybook/stories/playground/zIndexes.stories.js b/.storybook/stories/playground/zIndexes.stories.js
index e9262d05e..9189547b2 100644
--- a/.storybook/stories/playground/zIndexes.stories.js
+++ b/.storybook/stories/playground/zIndexes.stories.js
@@ -258,6 +258,4 @@ export const zIndexes = () => {
);
};
-zIndexes.story = {
- name: 'Z-Indexes',
-};
+zIndexes.storyName = 'Z-Indexes';
diff --git a/src/components/badge/badge.stories.js b/src/components/badge/badge.stories.js
index 25b3ca895..9af6104da 100644
--- a/src/components/badge/badge.stories.js
+++ b/src/components/badge/badge.stories.js
@@ -23,9 +23,7 @@ withIcon.args = {
icon: ,
};
-withIcon.story = {
- name: 'With icon',
-};
+withIcon.storyName = 'With icon';
export const withCustomElement = (args) => I'm a badge;
@@ -34,6 +32,4 @@ withCustomElement.args = {
href: 'https://teamleader.eu',
};
-withCustomElement.story = {
- name: 'With custom element',
-};
+withCustomElement.storyName = 'With custom element';
diff --git a/src/components/button/button.stories.js b/src/components/button/button.stories.js
index 3a6571f53..d86198b17 100644
--- a/src/components/button/button.stories.js
+++ b/src/components/button/button.stories.js
@@ -27,24 +27,16 @@ withTextAndIcon.args = {
label: 'Button with icon and text',
};
-withTextAndIcon.story = {
- name: 'With text and icon',
-};
+withTextAndIcon.storyName = 'With text and icon';
export const WithText = () => ;
-WithText.story = {
- name: 'With text',
-};
+WithText.storyName = 'With text';
export const withIcon = () => } />;
-withIcon.story = {
- name: 'With icon',
-};
+withIcon.storyName = 'With icon';
export const withCustomElement = () => ;
-withCustomElement.story = {
- name: 'With custom element',
-};
+withCustomElement.storyName = 'With custom element';
diff --git a/src/components/buttonGroup/buttonGroup.stories.js b/src/components/buttonGroup/buttonGroup.stories.js
index 440ee6101..ee3edc298 100644
--- a/src/components/buttonGroup/buttonGroup.stories.js
+++ b/src/components/buttonGroup/buttonGroup.stories.js
@@ -33,6 +33,4 @@ export const withActive = () => {
);
};
-withActive.story = {
- name: 'With active',
-};
+withActive.storyName = 'With active';
diff --git a/src/components/checkbox/checkbox.stories.js b/src/components/checkbox/checkbox.stories.js
index 7e5f12ce1..5e48ad9ec 100644
--- a/src/components/checkbox/checkbox.stories.js
+++ b/src/components/checkbox/checkbox.stories.js
@@ -20,9 +20,7 @@ DefaultStory.args = {
label: 'I am the label',
};
-DefaultStory.story = {
- name: 'Default',
-};
+DefaultStory.storyName = 'Default';
export const WithLinkInLabel = () => (
@@ -36,12 +34,8 @@ export const WithLinkInLabel = () => (
);
-WithLinkInLabel.story = {
- name: 'With link in label',
-};
+WithLinkInLabel.storyName = 'With link in label';
export const WithIndeterminateState = () => ;
-WithIndeterminateState.story = {
- name: 'With indeterminate state',
-};
+WithIndeterminateState.storyName = 'With indeterminate state';
diff --git a/src/components/counter/counter.stories.js b/src/components/counter/counter.stories.js
index 36c8cf2d1..bbaedfbcb 100644
--- a/src/components/counter/counter.stories.js
+++ b/src/components/counter/counter.stories.js
@@ -19,13 +19,10 @@ Basic.args = { count: 99 };
export const WithMaxCount = (args) => ;
WithMaxCount.args = { count: 99, maxCount: 98 };
-WithMaxCount.story = {
- name: 'With maxCount',
-};
+WithMaxCount.storyName = 'With maxCount';
+
export const WithExtraText = (args) => ;
WithExtraText.args = { children: 'Tasks', count: 99 };
-WithExtraText.story = {
- name: 'With extra text',
-};
+WithExtraText.storyName = 'With extra text';
diff --git a/src/components/datepicker/datePicker.stories.js b/src/components/datepicker/datePicker.stories.js
index c7965c4bb..fae6b157f 100644
--- a/src/components/datepicker/datePicker.stories.js
+++ b/src/components/datepicker/datePicker.stories.js
@@ -65,24 +65,22 @@ export const singleDate = () => {
);
};
-singleDate.story = {
- name: 'Single date',
+singleDate.storyName = 'Single date';
+singleDate.parameters = {
+ design: [
+ {
+ name: 'Figma',
+ type: 'figma',
+ url: 'https://www.figma.com/file/LHH25GN90ljQaBEUNMsdJn/Desktop-components?node-id=980%3A0',
+ },
+ {
+ name: 'Vendor docs',
+ type: 'iframe',
+ url: 'http://react-day-picker.js.org/api/DayPicker',
+ },
+ ],
+}
- parameters: {
- design: [
- {
- name: 'Figma',
- type: 'figma',
- url: 'https://www.figma.com/file/LHH25GN90ljQaBEUNMsdJn/Desktop-components?node-id=980%3A0',
- },
- {
- name: 'Vendor docs',
- type: 'iframe',
- url: 'http://react-day-picker.js.org/api/DayPicker',
- },
- ],
- },
-};
export const inputSingleDate = () => {
const handleOnChange = (selectedDate) => {
@@ -120,21 +118,18 @@ export const inputSingleDate = () => {
);
};
-inputSingleDate.story = {
- name: 'Input single date',
-
- parameters: {
- design: [
- {
- name: 'Figma',
- type: 'figma',
- url: 'https://www.figma.com/file/LHH25GN90ljQaBEUNMsdJn/Desktop-components?node-id=980%3A0',
- },
- {
- name: 'Vendor docs',
- type: 'iframe',
- url: 'http://react-day-picker.js.org/api/DayPickerInput',
- },
- ],
- },
-};
+inputSingleDate.storyName = 'Input single date';
+inputSingleDate.parameters = {
+ design: [
+ {
+ name: 'Figma',
+ type: 'figma',
+ url: 'https://www.figma.com/file/LHH25GN90ljQaBEUNMsdJn/Desktop-components?node-id=980%3A0',
+ },
+ {
+ name: 'Vendor docs',
+ type: 'iframe',
+ url: 'http://react-day-picker.js.org/api/DayPickerInput',
+ },
+ ],
+}
diff --git a/src/components/detailPage/detailPage.stories.js b/src/components/detailPage/detailPage.stories.js
index ff9da7fef..3825601e4 100644
--- a/src/components/detailPage/detailPage.stories.js
+++ b/src/components/detailPage/detailPage.stories.js
@@ -1,16 +1,16 @@
import React from 'react';
-import { select, text } from '@storybook/addon-knobs';
-import { addStoryInGroup, COMPOSITIONS } from '../../../.storybook/utils';
+import {select, text} from '@storybook/addon-knobs';
+import {addStoryInGroup, COMPOSITIONS} from '../../../.storybook/utils';
import Button from '../button';
import ButtonGroup from '../buttonGroup';
import DetailPage from './DetailPage';
import Icon from '../icon';
import IconButton from '../iconButton';
-import { IconTrashMediumOutline, IconWarningBadgedMediumFilled } from '@teamleader/ui-icons';
+import {IconTrashMediumOutline, IconWarningBadgedMediumFilled} from '@teamleader/ui-icons';
import StatusLabel from '../statusLabel';
-import { Box } from '../box';
-import { Heading1, Monospaced, TextBody } from '../typography';
-import { COLOR } from '../../constants';
+import {Box} from '../box';
+import {Heading1, Monospaced, TextBody} from '../typography';
+import {COLOR} from '../../constants';
const titleColors = ['neutral', 'teal'];
@@ -94,14 +94,12 @@ export const composition = () => (
);
-composition.story = {
- name: 'Composition',
- parameters: {
- info: {
- propTables: [DetailPage],
- },
+composition.storyName = 'Composition';
+composition.parameters = {
+ info: {
+ propTables: [DetailPage],
},
-};
+}
export const body = () => (
@@ -109,14 +107,12 @@ export const body = () => (
);
-body.story = {
- name: 'Body',
- parameters: {
- info: {
- propTables: [DetailPage.Body],
- },
+body.storyName = 'Body';
+body.parameters = {
+ info: {
+ propTables: [DetailPage.Body],
},
-};
+}
export const header = () => (
(
/>
);
-header.story = {
- name: 'Header',
- parameters: {
- info: {
- propTables: [DetailPage.Header],
- },
+header.storyName = 'Header';
+header.parameters = {
+ info: {
+ propTables: [DetailPage.Header]
},
-};
+}
export const headerWithTitleSuffix = () => (
(
/>
);
-headerWithTitleSuffix.story = {
- name: 'Header with title suffix',
- parameters: {
- info: {
- propTables: [DetailPage.Header],
- },
+headerWithTitleSuffix.storyName = 'Header with title suffix';
+headerWithTitleSuffix.parameters = {
+ info: {
+ propTables: [DetailPage.Header]
},
-};
+}
export const headerWithActions = () => (
(
);
-headerWithActions.story = {
- name: 'Header with actions',
- parameters: {
- info: {
- propTables: [DetailPage.Header],
- },
+headerWithActions.storyName = 'Header with actions';
+headerWithActions.parameters = {
+ info: {
+ propTables: [DetailPage.Header]
},
-};
+}
export const headerWithTotals = () => (
(
);
-headerWithTotals.story = {
- name: 'Header with totals',
- parameters: {
- info: {
- propTables: [DetailPage.Header],
- },
+headerWithTotals.storyName = 'Header with totals';
+headerWithTotals.parameters = {
+ info: {
+ propTables: [DetailPage.Header]
},
-};
+}
export const headerWithTotalsAndActions = () => (
(
);
-headerWithTotalsAndActions.story = {
- name: 'Header with totals and actions',
- parameters: {
- info: {
- propTables: [DetailPage.Header],
- },
+headerWithTotalsAndActions.storyName = 'Header with totals and actions';
+headerWithTotalsAndActions.parameters = {
+ info: {
+ propTables: [DetailPage.Header]
},
-};
+}
export const headerWithEverthingTogether = () => (
(
);
-headerWithEverthingTogether.story = {
- name: 'Header with everything together',
- parameters: {
- info: {
- propTables: [DetailPage.Header],
- },
+headerWithEverthingTogether.storyName = 'Header with everything together';
+headerWithEverthingTogether.parameters = {
+ info: {
+ propTables: [DetailPage.Header]
},
-};
+}
diff --git a/src/components/iconButton/iconButton.stories.js b/src/components/iconButton/iconButton.stories.js
index b34cce99e..5fe88c569 100644
--- a/src/components/iconButton/iconButton.stories.js
+++ b/src/components/iconButton/iconButton.stories.js
@@ -21,6 +21,4 @@ export const basic = ({ size, ...args }) => (
export const withCustomElement = () => } element="a" />;
-withCustomElement.story = {
- name: 'With custom element',
-};
+withCustomElement.storyName = 'With custom element';
diff --git a/src/components/illustration/illustration.stories.js b/src/components/illustration/illustration.stories.js
index d8057d282..8378f10aa 100644
--- a/src/components/illustration/illustration.stories.js
+++ b/src/components/illustration/illustration.stories.js
@@ -51,9 +51,7 @@ export const _24X24 = () => (
);
-_24X24.story = {
- name: '24x24',
-};
+_24X24.storyName = '24x24';
export const _36X24 = () => (
@@ -74,9 +72,7 @@ export const _36X24 = () => (
);
-_36X24.story = {
- name: '36x24',
-};
+_36X24.storyName = '36x24';
export const _48X48 = () => (
@@ -97,9 +93,7 @@ export const _48X48 = () => (
);
-_48X48.story = {
- name: '48x48',
-};
+_48X48.storyName = '48x48';
export const _60X60 = () => (
@@ -120,9 +114,7 @@ export const _60X60 = () => (
);
-_60X60.story = {
- name: '60x60',
-};
+_60X60.storyName = '60x60';
export const _84X84 = () => (
@@ -143,9 +135,7 @@ export const _84X84 = () => (
);
-_84X84.story = {
- name: '84x84',
-};
+_84X84.storyName = '84x84';
export const _90X90 = () => (
@@ -166,9 +156,7 @@ export const _90X90 = () => (
);
-_90X90.story = {
- name: '90x90',
-};
+_90X90.storyName = '90x90';
export const _120X120 = () => (
@@ -189,9 +177,7 @@ export const _120X120 = () => (
);
-_120X120.story = {
- name: '120x120',
-};
+_120X120.storyName = '120x120';
export const _240X240 = () => (
@@ -212,6 +198,4 @@ export const _240X240 = () => (
);
-_240X240.story = {
- name: '240x240',
-};
+_240X240.storyName = '240x240';
diff --git a/src/components/input/input.stories.js b/src/components/input/input.stories.js
index 5f89ad650..c0e03f01b 100644
--- a/src/components/input/input.stories.js
+++ b/src/components/input/input.stories.js
@@ -144,9 +144,7 @@ export const numericInput = () => {
);
};
-numericInput.story = {
- name: 'NumericInput',
-};
+numericInput.storyName = 'NumericInput';
export const timeInput = () => {
const [value, setValue] = useState('');
@@ -190,9 +188,7 @@ export const timeInput = () => {
);
};
-timeInput.story = {
- name: 'TimeInput',
-};
+timeInput.storyName = 'TimeInput';
export const durationInput = () => {
const [value, setValue] = useState();
@@ -200,9 +196,7 @@ export const durationInput = () => {
return ;
};
-durationInput.story = {
- name: 'DurationInput',
-};
+durationInput.storyName = 'DurationInput';
export const textarea = () => (