File size: 1,789 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { fn } from '@storybook/test';
import { Button } from '.';
import type { Meta, StoryObj } from '@storybook/react';

/**
 * This button has been deprecated due to aggressive and generic CSS that breaks many other buttons when imported.
 * Use the [`Button` component](https://wordpress.github.io/gutenberg/?path=/docs/components-button--docs)
 * from `@wordpress/components` instead.
 */
const meta: Meta< typeof Button > = {
	title: 'Deprecated/Button',
	component: Button,
	args: {
		onClick: fn(),
	},
	parameters: {
		docs: {
			canvas: { sourceState: 'shown' },
		},
	},
};
export default meta;

type Story = StoryObj< typeof meta >;

export const Default: Story = {
	args: {
		children: 'Hello World!',
	},
};

export const Compact: Story = {
	...Default,
	args: {
		...Default.args,
		compact: true,
	},
};

export const Busy: Story = {
	...Default,
	args: {
		...Default.args,
		busy: true,
	},
};

export const Scary: Story = {
	...Default,
	args: {
		...Default.args,
		scary: true,
	},
};

export const Borderless: Story = {
	...Default,
	args: {
		...Default.args,
		borderless: true,
	},
};

export const Disabled: Story = {
	...Default,
	args: {
		...Default.args,
		disabled: true,
	},
};

export const Link: Story = {
	...Default,
	args: {
		...Default.args,
		href: 'https://www.automattic.com/',
		target: '_blank',
	},
};

export const Plain: Story = {
	...Default,
	args: {
		...Default.args,
		plain: true,
	},
};

export const Transparent: Story = {
	...Default,
	args: {
		...Default.args,
		transparent: true,
		style: {
			'--transparent-button-text-color': '#eee',
			'--transparent-button-text-color-hover': '#00b9eb',
		},
	},
	decorators: [
		( Story ) => (
			<div style={ { padding: '20px', background: 'black' } }>
				<Story />
			</div>
		),
	],
};