@@ -69,7 +61,3 @@ export const startsOpen = () => (
)}
);
-
-startsOpen.story = {
- name: 'starts open',
-};
diff --git a/src/components/tooltip/ListItem.stories.js b/src/components/tooltip/ListItem.stories.js
index 5a55608c..b0dc59e6 100644
--- a/src/components/tooltip/ListItem.stories.js
+++ b/src/components/tooltip/ListItem.stories.js
@@ -1,24 +1,22 @@
import React from 'react';
-
import { ListItem } from './ListItem';
import { Icon } from '../Icon';
import { StoryLinkWrapper } from '../StoryLinkWrapper';
export default {
title: 'Design System/tooltip/ListItem',
-
decorators: [
storyFn => (
{storyFn()}
),
],
-
- parameters: {
- component: ListItem,
- },
+ component: ListItem,
};
-export const all = () => (
+export const Default = args =>
;
+Default.args = { title: 'Default' };
+
+export const All = () => (
@@ -46,66 +44,57 @@ export const all = () => (
);
-export const loading = () =>
;
-export const defaultStory = () =>
;
+export const Loading = Default.bind();
+Loading.args = { isLoading: true };
-defaultStory.story = {
- name: 'default',
-};
+export const LongTitle = Default.bind();
+LongTitle.args = { title: 'lorem ipsum dolor sit amet consectatur' };
-export const longTitle = () =>
;
+export const DefaultIcon = Default.bind();
+DefaultIcon.args = { title: 'Default icon', right:
};
-longTitle.story = {
- name: 'long title',
+export const ActiveIcon = Default.bind();
+ActiveIcon.args = {
+ active: true,
+ ...DefaultIcon.args,
};
-export const defaultIcon = () =>
} />;
-
-defaultIcon.story = {
- name: 'default icon',
+export const WithPositions = Default.bind();
+WithPositions.args = {
+ left: 'left',
+ title: 'title',
+ center: 'center',
+ right: 'right',
};
-export const activeIcon = () =>
} />;
-
-activeIcon.story = {
- name: 'active icon',
+export const WithPositionsActive = Default.bind();
+WithPositionsActive.args = {
+ active: true,
+ left: 'left',
+ title: 'active',
+ center: 'center',
+ right: 'right',
};
-export const wPositions = () => (
-
-);
-
-wPositions.story = {
- name: 'w/positions',
+export const WithPositionsActiveLongTitle = Default.bind();
+WithPositionsActiveLongTitle.args = {
+ active: true,
+ left: '✅',
+ title: 'lorem ipsum dolor sit amet consectatur',
+ center: 'center',
+ right:
,
};
-export const wPositionsActive = () => (
-
-);
-
-wPositionsActive.story = {
- name: 'w/positions active',
-};
-
-export const wPositionsActiveLongTitle = () => (
-
}
- />
-);
-
-wPositionsActiveLongTitle.story = {
- name: 'w/positions active long title',
+export const Disabled = Default.bind();
+Disabled.args = {
+ disabled: true,
+ left: 'left',
+ title: 'disabled',
+ center: 'center',
+ right: 'right',
};
-export const disabled = () => (
-
-);
-
-export const withLinkWrapper = () => (
+export const WithLinkWrapper = () => (
<>
@@ -122,7 +111,3 @@ export const withLinkWrapper = () => (
/>
>
);
-
-withLinkWrapper.story = {
- name: 'with LinkWrapper',
-};
diff --git a/src/components/tooltip/Tooltip.stories.js b/src/components/tooltip/Tooltip.stories.js
index f647ede3..bc7fbcd5 100644
--- a/src/components/tooltip/Tooltip.stories.js
+++ b/src/components/tooltip/Tooltip.stories.js
@@ -16,10 +16,7 @@ const Content = styled.div`
export default {
title: 'Design System/tooltip/Tooltip',
-
- parameters: {
- component: Tooltip,
- },
+ component: Tooltip,
};
export const basicDefault = () => (
@@ -28,9 +25,7 @@ export const basicDefault = () => (
);
-basicDefault.story = {
- name: 'basic, default',
-};
+basicDefault.storyName = 'basic, default';
export const basicDefaultBottom = () => (
@@ -38,9 +33,7 @@ export const basicDefaultBottom = () => (
);
-basicDefaultBottom.story = {
- name: 'basic, default, bottom',
-};
+basicDefaultBottom.storyName = 'basic, default, bottom';
export const basicDefaultLeft = () => (
@@ -48,9 +41,7 @@ export const basicDefaultLeft = () => (
);
-basicDefaultLeft.story = {
- name: 'basic, default, left',
-};
+basicDefaultLeft.storyName = 'basic, default, left';
export const basicDefaultRight = () => (
@@ -58,9 +49,7 @@ export const basicDefaultRight = () => (
);
-basicDefaultRight.story = {
- name: 'basic, default, right',
-};
+basicDefaultRight.storyName = 'basic, default, right';
export const noChrome = () => (
@@ -68,6 +57,4 @@ export const noChrome = () => (
);
-noChrome.story = {
- name: 'no chrome',
-};
+noChrome.storyName = 'no chrome';
diff --git a/src/components/tooltip/TooltipLinkList.stories.js b/src/components/tooltip/TooltipLinkList.stories.js
index dff02c7b..eae7a26f 100644
--- a/src/components/tooltip/TooltipLinkList.stories.js
+++ b/src/components/tooltip/TooltipLinkList.stories.js
@@ -28,14 +28,10 @@ export default {
export const story0 = () =>
;
-story0.story = {
- name: 'links',
-};
+story0.storyName = 'links';
export const linksAndCallback = () => (
);
-linksAndCallback.story = {
- name: 'links and callback',
-};
+linksAndCallback.storyName = 'links and callback';
diff --git a/src/components/tooltip/TooltipMessage.stories.js b/src/components/tooltip/TooltipMessage.stories.js
index 2cfbe718..4eae45b0 100644
--- a/src/components/tooltip/TooltipMessage.stories.js
+++ b/src/components/tooltip/TooltipMessage.stories.js
@@ -15,10 +15,7 @@ export default {
),
],
-
- parameters: {
- component: TooltipMessage,
- },
+ component: TooltipMessage,
};
export const defaultStory = () => (
@@ -28,9 +25,7 @@ export const defaultStory = () => (
/>
);
-defaultStory.story = {
- name: 'default',
-};
+defaultStory.storyName = 'default';
export const withLink = () => (