Skip to content

Commit ae485f2

Browse files
author
Nikolai Lopin
committed
docs: use helper for dark background
1 parent 878b4fa commit ae485f2

File tree

5 files changed

+10
-15
lines changed

5 files changed

+10
-15
lines changed

src/components/Button/docs/Button.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { StoryObj, Meta } from '@storybook/react';
22
import React from 'react';
33
import { Button } from '../Button';
44
import TrashBinIcon from '../../../icons/actions/TrashBinIcon';
5+
import { onDarkBackground } from '../../../docs/parameters';
56

67
const meta: Meta = {
78
title: 'Components/Button/Button',
@@ -83,9 +84,7 @@ export const Inverted: Story = {
8384
inverted: true
8485
},
8586
parameters: {
86-
backgrounds: {
87-
default: 'dark'
88-
}
87+
...onDarkBackground
8988
}
9089
};
9190

src/components/Button/docs/TextButton.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22
import { StoryObj, Meta } from '@storybook/react';
33
import { TextButton } from '../TextButton';
4+
import { onDarkBackground } from '../../../docs/parameters';
45

56
const meta: Meta = {
67
title: 'Components/Button/TextButton',
@@ -76,8 +77,6 @@ export const Inverted: Story = {
7677
inverted: true
7778
},
7879
parameters: {
79-
backgrounds: {
80-
default: 'dark'
81-
}
80+
...onDarkBackground
8281
}
8382
};

src/components/Headline/docs/Headline.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Meta, StoryObj } from '@storybook/react';
22
import { DEFAULT_HEADLINE_SIZE, Headline } from '../Headline';
3+
import { onDarkBackground } from '../../../docs/parameters';
34

45
const meta: Meta = {
56
title: 'Components/Headline',
@@ -46,9 +47,7 @@ export const Inverted: Story = {
4647
inverted: true
4748
},
4849
parameters: {
49-
backgrounds: {
50-
default: 'dark'
51-
}
50+
...onDarkBackground
5251
}
5352
};
5453

src/components/HelperText/docs/HelperText.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Meta, StoryObj } from '@storybook/react';
22
import { HelperText } from '../HelperText';
3+
import { onDarkBackground } from '../../../docs/parameters';
34

45
const meta: Meta = {
56
title: 'Components/HelperText',
@@ -32,8 +33,6 @@ export const Inverted: Story = {
3233
inverted: true
3334
},
3435
parameters: {
35-
backgrounds: {
36-
default: 'dark'
37-
}
36+
...onDarkBackground
3837
}
3938
};

src/components/Logo/docs/Logo.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Meta, StoryObj } from '@storybook/react';
22
import { Logo } from '../Logo';
3+
import { onDarkBackground } from '../../../docs/parameters';
34

45
const meta: Meta<typeof Logo> = {
56
title: 'Components/Logo',
@@ -36,8 +37,6 @@ export const Inverted: Story = {
3637
inverted: true
3738
},
3839
parameters: {
39-
backgrounds: {
40-
default: 'dark'
41-
}
40+
...onDarkBackground
4241
}
4342
};

0 commit comments

Comments
 (0)