Skip to content

Commit e5526f1

Browse files
committed
Add decorator to Storybook to better visualize all logo variations
1 parent ca989eb commit e5526f1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

packages/components/src/logos/jetpack-logo/stories/index.stories.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ import type { Meta, StoryObj } from '@storybook/react';
44
const meta: Meta< typeof JetpackLogo > = {
55
title: 'Unaudited/Logos/JetpackLogo',
66
component: JetpackLogo,
7+
decorators: [
8+
( Story, { args } ) => (
9+
<div
10+
style={ {
11+
backgroundColor: args.theme === 'dark' ? '#000' : '#fff',
12+
color: args.theme === 'dark' ? '#fff' : '#000',
13+
minHeight: '100px',
14+
padding: '1rem',
15+
display: 'flex',
16+
alignItems: 'center',
17+
justifyContent: 'center',
18+
} }
19+
>
20+
<Story />
21+
</div>
22+
),
23+
],
724
};
825
export default meta;
926

@@ -17,6 +34,10 @@ export const Full: Story = {
1734
},
1835
};
1936

37+
/**
38+
* The monochrome version uses the same color as the inherited text color,
39+
* and uses a mask for the triangles in the logo (instead of a fill).
40+
*/
2041
export const Monochrome: Story = {
2142
args: {
2243
monochrome: true,

0 commit comments

Comments
 (0)