|
| 1 | +import { Breadcrumbs } from '@automattic/components/src/breadcrumbs'; |
1 | 2 | import { Meta, StoryObj } from '@storybook/react';
|
2 | 3 | import { Button, Icon, DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';
|
3 | 4 | import { help, wordpress, moreVertical } from '@wordpress/icons';
|
@@ -37,61 +38,36 @@ export const WithActions: Story = {
|
37 | 38 | },
|
38 | 39 | };
|
39 | 40 |
|
40 |
| -export const FullExample: Story = { |
| 41 | +export const ImageDecoration: Story = { |
41 | 42 | args: {
|
42 | 43 | title: 'Site Customization',
|
43 | 44 | description: 'Make your site look exactly how you want it to',
|
44 |
| - decoration: <Icon icon={ wordpress } />, |
45 |
| - breadcrumbItems: [ |
46 |
| - { label: 'Dashboard', href: 'javascript:void(0)' }, |
47 |
| - { label: 'Appearance', href: 'javascript:void(0)' }, |
48 |
| - { label: 'Customize', href: 'javascript:void(0)' }, |
49 |
| - { label: 'Theme', href: 'javascript:void(0)' }, |
50 |
| - { label: 'Advanced', href: 'javascript:void(0)' }, |
51 |
| - ], |
| 45 | + decoration: <img src="https://placecats.com/300/200" alt="Cat" />, |
52 | 46 | actions: (
|
53 | 47 | <>
|
54 |
| - <Button icon={ help } variant="tertiary" __next40pxDefaultSize> |
55 |
| - Help |
56 |
| - </Button> |
57 |
| - <Button variant="secondary" __next40pxDefaultSize> |
58 |
| - Preview |
59 |
| - </Button> |
60 |
| - <DropdownMenu |
61 |
| - icon={ moreVertical } |
62 |
| - label="More actions" |
63 |
| - toggleProps={ { __next40pxDefaultSize: true } } |
64 |
| - > |
65 |
| - { () => ( |
66 |
| - <> |
67 |
| - <MenuGroup> |
68 |
| - <MenuItem>Import</MenuItem> |
69 |
| - <MenuItem>Export</MenuItem> |
70 |
| - <MenuItem>Settings</MenuItem> |
71 |
| - </MenuGroup> |
72 |
| - <MenuGroup> |
73 |
| - <MenuItem>Help</MenuItem> |
74 |
| - </MenuGroup> |
75 |
| - </> |
76 |
| - ) } |
77 |
| - </DropdownMenu> |
| 48 | + <Button variant="secondary">Cancel</Button> |
| 49 | + <Button variant="primary">Save Changes</Button> |
78 | 50 | </>
|
79 | 51 | ),
|
80 | 52 | },
|
81 | 53 | };
|
82 | 54 |
|
83 |
| -export const ImageDecoration: Story = { |
| 55 | +export const FullExample: Story = { |
84 | 56 | args: {
|
85 | 57 | title: 'Site Customization',
|
86 | 58 | description: 'Make your site look exactly how you want it to',
|
87 |
| - decoration: <img src="https://placecats.com/300/200" alt="Cat" />, |
88 |
| - breadcrumbItems: [ |
89 |
| - { label: 'Dashboard', href: 'javascript:void(0)' }, |
90 |
| - { label: 'Appearance', href: 'javascript:void(0)' }, |
91 |
| - { label: 'Customize', href: 'javascript:void(0)' }, |
92 |
| - { label: 'Theme', href: 'javascript:void(0)' }, |
93 |
| - { label: 'Advanced', href: 'javascript:void(0)' }, |
94 |
| - ], |
| 59 | + decoration: <Icon icon={ wordpress } />, |
| 60 | + breadcrumb: ( |
| 61 | + <Breadcrumbs |
| 62 | + items={ [ |
| 63 | + { label: 'Dashboard', href: 'javascript:void(0)' }, |
| 64 | + { label: 'Appearance', href: 'javascript:void(0)' }, |
| 65 | + { label: 'Customize', href: 'javascript:void(0)' }, |
| 66 | + { label: 'Theme', href: 'javascript:void(0)' }, |
| 67 | + { label: 'Advanced', href: 'javascript:void(0)' }, |
| 68 | + ] } |
| 69 | + /> |
| 70 | + ), |
95 | 71 | actions: (
|
96 | 72 | <>
|
97 | 73 | <Button icon={ help } variant="tertiary" __next40pxDefaultSize>
|
|
0 commit comments