@transferwise/components 46.132.1 → 46.133.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/chips/Chips.js.map +1 -1
- package/build/chips/Chips.mjs.map +1 -1
- package/build/inputs/InputGroup.js +10 -1
- package/build/inputs/InputGroup.js.map +1 -1
- package/build/inputs/InputGroup.mjs +10 -1
- package/build/inputs/InputGroup.mjs.map +1 -1
- package/build/label/Label.js +1 -1
- package/build/label/Label.js.map +1 -1
- package/build/label/Label.mjs +1 -1
- package/build/label/Label.mjs.map +1 -1
- package/build/logo/Logo.js +6 -0
- package/build/logo/Logo.js.map +1 -1
- package/build/logo/Logo.mjs +6 -0
- package/build/logo/Logo.mjs.map +1 -1
- package/build/main.css +22 -6
- package/build/phoneNumberInput/PhoneNumberInput.js +6 -1
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +6 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/styles/inputs/InputGroup.css +10 -2
- package/build/styles/listItem/ListItem.css +4 -4
- package/build/styles/listItem/ListItem.grid.css +3 -3
- package/build/styles/main.css +22 -6
- package/build/styles/phoneNumberInput/PhoneNumberInput.css +5 -0
- package/build/types/chips/Chips.d.ts +1 -1
- package/build/types/chips/Chips.d.ts.map +1 -1
- package/build/types/common/commonProps.d.ts +0 -6
- package/build/types/common/commonProps.d.ts.map +1 -1
- package/build/types/label/Label.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +10 -1
- package/build/types/logo/Logo.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/button/_stories/Button.accessibility.docs.mdx +10 -6
- package/src/button/_stories/Button.story.tsx +15 -7
- package/src/checkboxButton/CheckboxButton.story.tsx +125 -44
- package/src/checkboxButton/CheckboxButton.test.story.tsx +236 -0
- package/src/chips/Chips.story.tsx +141 -102
- package/src/chips/Chips.test.story.tsx +177 -0
- package/src/chips/Chips.tsx +1 -1
- package/src/circularButton/CircularButton.story.tsx +261 -49
- package/src/circularButton/CircularButton.test.story.tsx +192 -2
- package/src/common/bottomSheet/BottomSheet.story.tsx +11 -9
- package/src/common/bottomSheet/BottomSheet.test.story.tsx +28 -15
- package/src/common/commonProps.ts +0 -6
- package/src/divider/Divider.accessibility.docs.mdx +1 -10
- package/src/divider/Divider.story.tsx +0 -1
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.story.tsx +1 -2
- package/src/header/Header.accessibility.docs.mdx +9 -5
- package/src/iconButton/IconButton.story.tsx +315 -110
- package/src/iconButton/IconButton.test.story.tsx +217 -44
- package/src/inputs/InputGroup.css +10 -2
- package/src/inputs/InputGroup.less +12 -2
- package/src/inputs/InputGroup.story.tsx +27 -0
- package/src/inputs/InputGroup.tsx +10 -0
- package/src/inputs/SelectInput/_stories/SelectInput.story.tsx +0 -1
- package/src/label/Label.tsx +1 -2
- package/src/legacylistItem/LegacyListItem.test.story.tsx +1 -1
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.story.tsx +0 -1
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +0 -1
- package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +0 -1
- package/src/listItem/Button/ListItemButton.story.tsx +0 -1
- package/src/listItem/Checkbox/ListItemCheckbox.story.tsx +0 -1
- package/src/listItem/IconButton/ListItemIconButton.story.tsx +0 -1
- package/src/listItem/ListItem.css +4 -4
- package/src/listItem/ListItem.grid.css +3 -3
- package/src/listItem/ListItem.grid.less +5 -3
- package/src/listItem/ListItem.less +1 -1
- package/src/listItem/ListItem.vars.less +2 -2
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +0 -1
- package/src/listItem/Prompt/ListItemPrompt.story.tsx +0 -1
- package/src/listItem/Radio/ListItemRadio.story.tsx +0 -1
- package/src/listItem/Switch/ListItemSwitch.story.tsx +0 -1
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +55 -0
- package/src/listItem/_stories/ListItem.story.tsx +1 -0
- package/src/logo/Logo.story.tsx +181 -21
- package/src/logo/Logo.test.story.tsx +40 -7
- package/src/logo/Logo.tsx +10 -1
- package/src/main.css +22 -6
- package/src/phoneNumberInput/PhoneNumberInput.css +5 -0
- package/src/phoneNumberInput/PhoneNumberInput.less +7 -0
- package/src/phoneNumberInput/PhoneNumberInput.tsx +10 -1
- package/src/prompt/InlinePrompt/InlinePrompt.story.tsx +0 -1
- package/src/section/Section.story.tsx +12 -7
- package/src/sentimentSurface/SentimentSurface.story.tsx +1 -1
- package/src/snackbar/Snackbar.test.story.tsx +16 -104
- package/src/summary/Summary.test.story.tsx +1 -1
- package/src/switch/Switch.story.tsx +64 -42
- package/src/switch/Switch.test.story.tsx +123 -0
- package/src/switchOption/SwitchOption.story.tsx +0 -1
|
@@ -13,112 +13,265 @@ import {
|
|
|
13
13
|
Bank,
|
|
14
14
|
Freeze,
|
|
15
15
|
} from '@transferwise/icons';
|
|
16
|
+
import { fn } from 'storybook/test';
|
|
16
17
|
import IconButton, { Props } from './IconButton';
|
|
17
|
-
import { action } from 'storybook/actions';
|
|
18
|
-
import Body from '../body';
|
|
19
18
|
import SentimentSurface from '../sentimentSurface';
|
|
20
19
|
|
|
20
|
+
/**
|
|
21
|
+
* **Design guidance**: <a href="https://wise.design/components/icon-button" target="_blank">wise.design/components/icon-button</a>
|
|
22
|
+
*/
|
|
21
23
|
export default {
|
|
22
24
|
title: 'Actions/IconButton',
|
|
23
25
|
component: IconButton,
|
|
26
|
+
args: {
|
|
27
|
+
onClick: fn(),
|
|
28
|
+
'aria-label': 'Action',
|
|
29
|
+
},
|
|
30
|
+
argTypes: {
|
|
31
|
+
id: { table: { category: 'Common' } },
|
|
32
|
+
className: { table: { category: 'Common' } },
|
|
33
|
+
role: { table: { category: 'Common' } },
|
|
34
|
+
tabIndex: { table: { category: 'Common' } },
|
|
35
|
+
'data-testid': { table: { category: 'Common' } },
|
|
36
|
+
onClick: { table: { category: 'Common' } },
|
|
37
|
+
},
|
|
38
|
+
parameters: {
|
|
39
|
+
docs: { toc: true },
|
|
40
|
+
},
|
|
24
41
|
} satisfies Meta<typeof IconButton>;
|
|
25
42
|
|
|
26
43
|
type Story = StoryObj<typeof IconButton>;
|
|
27
44
|
|
|
28
45
|
const sizes: Props['size'][] = [16, 24, 32, 40, 48, 56, 72];
|
|
29
46
|
|
|
30
|
-
|
|
31
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Explore size, priority, type, and disabled state via the controls panel.
|
|
49
|
+
* Use `aria-label` to provide an accessible name.
|
|
50
|
+
*/
|
|
51
|
+
export const Playground: Story = {
|
|
52
|
+
args: {
|
|
53
|
+
size: 48,
|
|
54
|
+
priority: 'primary',
|
|
55
|
+
type: 'default',
|
|
56
|
+
disabled: false,
|
|
57
|
+
},
|
|
58
|
+
render: (args) => (
|
|
59
|
+
<IconButton {...args}>
|
|
60
|
+
<Plus />
|
|
61
|
+
</IconButton>
|
|
62
|
+
),
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Priorities set a visual hierarchy amongst the buttons displayed on the
|
|
67
|
+
* screen to help more important buttons to take precedence over others. <br />
|
|
68
|
+
* <a href="https://wise.design/components/icon-button#priorities" target="_blank">Design documentation</a>
|
|
69
|
+
*/
|
|
70
|
+
export const Priority: Story = {
|
|
71
|
+
args: {
|
|
72
|
+
type: 'default',
|
|
73
|
+
},
|
|
74
|
+
argTypes: {
|
|
75
|
+
type: {
|
|
76
|
+
control: 'radio',
|
|
77
|
+
options: ['default', 'negative'],
|
|
78
|
+
},
|
|
79
|
+
priority: { table: { disable: true } },
|
|
80
|
+
size: { table: { disable: true } },
|
|
81
|
+
disabled: { table: { disable: true } },
|
|
82
|
+
href: { table: { disable: true } },
|
|
83
|
+
target: { table: { disable: true } },
|
|
84
|
+
onClick: { table: { disable: true } },
|
|
85
|
+
},
|
|
86
|
+
decorators: [
|
|
87
|
+
(Story) => (
|
|
88
|
+
<div style={{ display: 'flex', gap: '24px', alignItems: 'center', justifyContent: 'center' }}>
|
|
89
|
+
<Story />
|
|
90
|
+
</div>
|
|
91
|
+
),
|
|
92
|
+
],
|
|
93
|
+
render: (args: Props) => (
|
|
32
94
|
<>
|
|
33
|
-
<IconButton
|
|
34
|
-
size={size}
|
|
35
|
-
disabled={disabled}
|
|
36
|
-
aria-label="One step back"
|
|
37
|
-
priority="primary"
|
|
38
|
-
type="default"
|
|
39
|
-
onClick={action('button click')}
|
|
40
|
-
>
|
|
95
|
+
<IconButton priority="primary" type={args.type} aria-label="Primary" onClick={fn()}>
|
|
41
96
|
<Plus />
|
|
42
97
|
</IconButton>
|
|
43
|
-
<IconButton
|
|
44
|
-
|
|
45
|
-
disabled={disabled}
|
|
46
|
-
aria-label="One step back"
|
|
47
|
-
priority="secondary"
|
|
48
|
-
type="default"
|
|
49
|
-
onClick={action('button click')}
|
|
50
|
-
>
|
|
51
|
-
<Defrost />
|
|
98
|
+
<IconButton priority="secondary" type={args.type} aria-label="Secondary" onClick={fn()}>
|
|
99
|
+
<Settings />
|
|
52
100
|
</IconButton>
|
|
53
|
-
<IconButton
|
|
54
|
-
|
|
55
|
-
disabled={disabled}
|
|
56
|
-
aria-label="One step back"
|
|
57
|
-
priority="tertiary"
|
|
58
|
-
type="default"
|
|
59
|
-
onClick={action('button click')}
|
|
60
|
-
>
|
|
61
|
-
<ArrowLeft />
|
|
101
|
+
<IconButton priority="tertiary" type={args.type} aria-label="Tertiary" onClick={fn()}>
|
|
102
|
+
<Star />
|
|
62
103
|
</IconButton>
|
|
63
|
-
<IconButton
|
|
64
|
-
size={size}
|
|
65
|
-
disabled={disabled}
|
|
66
|
-
aria-label="One step back"
|
|
67
|
-
priority="minimal"
|
|
68
|
-
type="default"
|
|
69
|
-
onClick={action('button click')}
|
|
70
|
-
>
|
|
104
|
+
<IconButton priority="minimal" type={args.type} aria-label="Minimal" onClick={fn()}>
|
|
71
105
|
<Menu />
|
|
72
106
|
</IconButton>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
107
|
+
</>
|
|
108
|
+
),
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* There are two different types of button – default and negative – designed to emphasise the nature of the action. <br />
|
|
113
|
+
* <a href="https://wise.design/components/icon-button#types" target="_blank">Design documentation</a>
|
|
114
|
+
*/
|
|
115
|
+
export const Type: Story = {
|
|
116
|
+
args: {
|
|
117
|
+
priority: 'primary',
|
|
118
|
+
},
|
|
119
|
+
argTypes: {
|
|
120
|
+
priority: {
|
|
121
|
+
control: 'radio',
|
|
122
|
+
options: ['primary', 'secondary', 'tertiary', 'minimal'],
|
|
123
|
+
},
|
|
124
|
+
type: { table: { disable: true } },
|
|
125
|
+
size: { table: { disable: true } },
|
|
126
|
+
disabled: { table: { disable: true } },
|
|
127
|
+
href: { table: { disable: true } },
|
|
128
|
+
target: { table: { disable: true } },
|
|
129
|
+
onClick: { table: { disable: true } },
|
|
130
|
+
},
|
|
131
|
+
decorators: [
|
|
132
|
+
(Story) => (
|
|
133
|
+
<div style={{ display: 'flex', gap: '24px', alignItems: 'center', justifyContent: 'center' }}>
|
|
134
|
+
<Story />
|
|
135
|
+
</div>
|
|
136
|
+
),
|
|
137
|
+
],
|
|
138
|
+
render: (args: Props) => (
|
|
139
|
+
<>
|
|
140
|
+
<IconButton priority={args.priority} type="default" aria-label="Default" onClick={fn()}>
|
|
141
|
+
<Plus />
|
|
82
142
|
</IconButton>
|
|
83
|
-
<IconButton
|
|
84
|
-
|
|
85
|
-
disabled={disabled}
|
|
86
|
-
aria-label="One step back"
|
|
87
|
-
priority="secondary"
|
|
88
|
-
type="negative"
|
|
89
|
-
onClick={action('button click')}
|
|
90
|
-
>
|
|
91
|
-
<Edit />
|
|
143
|
+
<IconButton priority={args.priority} type="negative" aria-label="Negative" onClick={fn()}>
|
|
144
|
+
<Cross />
|
|
92
145
|
</IconButton>
|
|
93
146
|
</>
|
|
94
|
-
)
|
|
147
|
+
),
|
|
95
148
|
};
|
|
96
149
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
150
|
+
/**
|
|
151
|
+
* IconButton is available in 7 sizes: 16, 24, 32, 40, 48, 56, 72. <br />
|
|
152
|
+
* <a href="https://wise.design/components/icon-button#sizes" target="_blank">Design documentation</a>
|
|
153
|
+
*/
|
|
154
|
+
export const Size: Story = {
|
|
155
|
+
args: {
|
|
156
|
+
priority: 'primary',
|
|
157
|
+
type: 'default',
|
|
158
|
+
},
|
|
159
|
+
argTypes: {
|
|
160
|
+
priority: {
|
|
161
|
+
control: 'radio',
|
|
162
|
+
options: ['primary', 'secondary', 'tertiary', 'minimal'],
|
|
163
|
+
},
|
|
164
|
+
type: {
|
|
165
|
+
control: 'radio',
|
|
166
|
+
options: ['default', 'negative'],
|
|
167
|
+
},
|
|
168
|
+
size: { table: { disable: true } },
|
|
169
|
+
disabled: { table: { disable: true } },
|
|
170
|
+
href: { table: { disable: true } },
|
|
171
|
+
target: { table: { disable: true } },
|
|
172
|
+
onClick: { table: { disable: true } },
|
|
173
|
+
},
|
|
174
|
+
decorators: [
|
|
175
|
+
(Story) => (
|
|
176
|
+
<div style={{ display: 'flex', gap: '24px', alignItems: 'center' }}>
|
|
177
|
+
<Story />
|
|
119
178
|
</div>
|
|
120
|
-
)
|
|
179
|
+
),
|
|
180
|
+
],
|
|
181
|
+
render: (args: Props) => (
|
|
182
|
+
<>
|
|
183
|
+
{sizes.map((size) => (
|
|
184
|
+
<div
|
|
185
|
+
key={size}
|
|
186
|
+
style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '8px' }}
|
|
187
|
+
>
|
|
188
|
+
<IconButton
|
|
189
|
+
size={size}
|
|
190
|
+
priority={args.priority}
|
|
191
|
+
type={args.type}
|
|
192
|
+
aria-label={`${size}px`}
|
|
193
|
+
>
|
|
194
|
+
<ArrowLeft />
|
|
195
|
+
</IconButton>
|
|
196
|
+
<span style={{ fontSize: '12px' }}>{size}px</span>
|
|
197
|
+
</div>
|
|
198
|
+
))}
|
|
199
|
+
</>
|
|
200
|
+
),
|
|
201
|
+
parameters: {
|
|
202
|
+
docs: {
|
|
203
|
+
source: {
|
|
204
|
+
code: `{[16, 24, 32, 40, 48, 56, 72].map((size) => (
|
|
205
|
+
<div key={size}>
|
|
206
|
+
<IconButton size={size} priority="primary" type="default" aria-label={\`\${size}px\`}>
|
|
207
|
+
<ArrowLeft />
|
|
208
|
+
</IconButton>
|
|
209
|
+
<span>{size}px</span>
|
|
210
|
+
</div>
|
|
211
|
+
))}`,
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Disabled buttons cannot be interacted with and are visually distinct.
|
|
219
|
+
*/
|
|
220
|
+
export const Disabled: Story = {
|
|
221
|
+
args: {
|
|
222
|
+
priority: 'primary',
|
|
223
|
+
type: 'default',
|
|
224
|
+
},
|
|
225
|
+
argTypes: {
|
|
226
|
+
priority: {
|
|
227
|
+
control: 'radio',
|
|
228
|
+
options: ['primary', 'secondary', 'tertiary', 'minimal'],
|
|
229
|
+
},
|
|
230
|
+
type: {
|
|
231
|
+
control: 'radio',
|
|
232
|
+
options: ['default', 'negative'],
|
|
233
|
+
},
|
|
234
|
+
size: { table: { disable: true } },
|
|
235
|
+
disabled: { table: { disable: true } },
|
|
236
|
+
href: { table: { disable: true } },
|
|
237
|
+
target: { table: { disable: true } },
|
|
238
|
+
onClick: { table: { disable: true } },
|
|
121
239
|
},
|
|
240
|
+
render: (args: Props) => (
|
|
241
|
+
<IconButton disabled priority={args.priority} type={args.type} aria-label="Disabled">
|
|
242
|
+
<Plus />
|
|
243
|
+
</IconButton>
|
|
244
|
+
),
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* IconButton can render as an anchor element when `href` is provided.
|
|
249
|
+
*/
|
|
250
|
+
export const AsAnchor: Story = {
|
|
251
|
+
args: {
|
|
252
|
+
priority: 'primary',
|
|
253
|
+
type: 'default',
|
|
254
|
+
href: 'https://wise.com',
|
|
255
|
+
target: '_blank',
|
|
256
|
+
},
|
|
257
|
+
argTypes: {
|
|
258
|
+
priority: {
|
|
259
|
+
control: 'radio',
|
|
260
|
+
options: ['primary', 'secondary', 'tertiary', 'minimal'],
|
|
261
|
+
},
|
|
262
|
+
type: {
|
|
263
|
+
control: 'radio',
|
|
264
|
+
options: ['default', 'negative'],
|
|
265
|
+
},
|
|
266
|
+
size: { table: { disable: true } },
|
|
267
|
+
disabled: { table: { disable: true } },
|
|
268
|
+
onClick: { table: { disable: true } },
|
|
269
|
+
},
|
|
270
|
+
render: (args: Props) => (
|
|
271
|
+
<IconButton {...args} aria-label="External link">
|
|
272
|
+
<ArrowLeft />
|
|
273
|
+
</IconButton>
|
|
274
|
+
),
|
|
122
275
|
};
|
|
123
276
|
|
|
124
277
|
/**
|
|
@@ -126,8 +279,25 @@ export const Basic: Story = {
|
|
|
126
279
|
* the [SentimentSurface](?path=/docs/foundations-sentimentsurface--docs) component
|
|
127
280
|
*/
|
|
128
281
|
export const SentimentAwareness: Story = {
|
|
129
|
-
|
|
130
|
-
|
|
282
|
+
args: {
|
|
283
|
+
size: 48,
|
|
284
|
+
},
|
|
285
|
+
argTypes: {
|
|
286
|
+
size: {
|
|
287
|
+
control: 'radio',
|
|
288
|
+
options: [16, 24, 32, 40, 48, 56, 72],
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
render: (args: Props) => {
|
|
292
|
+
const priorities = [
|
|
293
|
+
{ key: 'primary', label: 'primary' },
|
|
294
|
+
{ key: 'secondary', label: 'secondary' },
|
|
295
|
+
{ key: 'tertiary', label: 'tertiary' },
|
|
296
|
+
{ key: 'minimal', label: 'minimal' },
|
|
297
|
+
{ key: 'neg-primary', label: 'negative\nprimary' },
|
|
298
|
+
{ key: 'neg-secondary', label: 'negative\nsecondary' },
|
|
299
|
+
{ key: 'disabled', label: 'disabled' },
|
|
300
|
+
] as const;
|
|
131
301
|
const sentiments = ['success', 'warning', 'negative', 'neutral', 'proposition'] as const;
|
|
132
302
|
|
|
133
303
|
return (
|
|
@@ -137,21 +307,23 @@ export const SentimentAwareness: Story = {
|
|
|
137
307
|
<div style={{ width: '82px', paddingLeft: '8px' }} />
|
|
138
308
|
{priorities.map((priority) => (
|
|
139
309
|
<div
|
|
140
|
-
key={priority}
|
|
310
|
+
key={priority.key}
|
|
141
311
|
style={{
|
|
142
|
-
width:
|
|
312
|
+
width: `${args.size}px`,
|
|
143
313
|
textAlign: 'center',
|
|
144
314
|
fontSize: '11px',
|
|
145
315
|
fontWeight: 'bold',
|
|
146
316
|
writingMode: 'vertical-rl',
|
|
147
317
|
transform: 'rotate(180deg)',
|
|
148
|
-
height: '
|
|
318
|
+
height: '80px',
|
|
149
319
|
display: 'flex',
|
|
150
320
|
alignItems: 'center',
|
|
151
321
|
justifyContent: 'center',
|
|
322
|
+
whiteSpace: 'pre',
|
|
323
|
+
lineHeight: '1',
|
|
152
324
|
}}
|
|
153
325
|
>
|
|
154
|
-
{priority}
|
|
326
|
+
{priority.label}
|
|
155
327
|
</div>
|
|
156
328
|
))}
|
|
157
329
|
</div>
|
|
@@ -176,48 +348,66 @@ export const SentimentAwareness: Story = {
|
|
|
176
348
|
{sentiment} (base)
|
|
177
349
|
</div>
|
|
178
350
|
<IconButton
|
|
179
|
-
size={
|
|
351
|
+
size={args.size}
|
|
180
352
|
aria-label="Primary action"
|
|
181
353
|
priority="primary"
|
|
182
354
|
type="default"
|
|
183
|
-
onClick={
|
|
355
|
+
onClick={fn()}
|
|
184
356
|
>
|
|
185
357
|
<Plus />
|
|
186
358
|
</IconButton>
|
|
187
359
|
<IconButton
|
|
188
|
-
size={
|
|
360
|
+
size={args.size}
|
|
189
361
|
aria-label="Secondary action"
|
|
190
362
|
priority="secondary"
|
|
191
363
|
type="default"
|
|
192
|
-
onClick={
|
|
364
|
+
onClick={fn()}
|
|
193
365
|
>
|
|
194
366
|
<Settings />
|
|
195
367
|
</IconButton>
|
|
196
368
|
<IconButton
|
|
197
|
-
size={
|
|
369
|
+
size={args.size}
|
|
198
370
|
aria-label="Tertiary action"
|
|
199
371
|
priority="tertiary"
|
|
200
372
|
type="default"
|
|
201
|
-
onClick={
|
|
373
|
+
onClick={fn()}
|
|
202
374
|
>
|
|
203
375
|
<Star />
|
|
204
376
|
</IconButton>
|
|
205
377
|
<IconButton
|
|
206
|
-
size={
|
|
378
|
+
size={args.size}
|
|
207
379
|
aria-label="Minimal action"
|
|
208
380
|
priority="minimal"
|
|
209
381
|
type="default"
|
|
210
|
-
onClick={
|
|
382
|
+
onClick={fn()}
|
|
211
383
|
>
|
|
212
384
|
<Travel />
|
|
213
385
|
</IconButton>
|
|
214
386
|
<IconButton
|
|
215
|
-
size={
|
|
387
|
+
size={args.size}
|
|
388
|
+
aria-label="Negative primary action"
|
|
389
|
+
priority="primary"
|
|
390
|
+
type="negative"
|
|
391
|
+
onClick={fn()}
|
|
392
|
+
>
|
|
393
|
+
<Cross />
|
|
394
|
+
</IconButton>
|
|
395
|
+
<IconButton
|
|
396
|
+
size={args.size}
|
|
397
|
+
aria-label="Negative secondary action"
|
|
398
|
+
priority="secondary"
|
|
399
|
+
type="negative"
|
|
400
|
+
onClick={fn()}
|
|
401
|
+
>
|
|
402
|
+
<Edit />
|
|
403
|
+
</IconButton>
|
|
404
|
+
<IconButton
|
|
405
|
+
size={args.size}
|
|
216
406
|
aria-label="Disabled action"
|
|
217
407
|
priority="primary"
|
|
218
408
|
type="default"
|
|
219
409
|
disabled
|
|
220
|
-
onClick={
|
|
410
|
+
onClick={fn()}
|
|
221
411
|
>
|
|
222
412
|
<Menu />
|
|
223
413
|
</IconButton>
|
|
@@ -240,48 +430,66 @@ export const SentimentAwareness: Story = {
|
|
|
240
430
|
{sentiment} (elevated)
|
|
241
431
|
</div>
|
|
242
432
|
<IconButton
|
|
243
|
-
size={
|
|
433
|
+
size={args.size}
|
|
244
434
|
aria-label="Primary action"
|
|
245
435
|
priority="primary"
|
|
246
436
|
type="default"
|
|
247
|
-
onClick={
|
|
437
|
+
onClick={fn()}
|
|
248
438
|
>
|
|
249
439
|
<Briefcase />
|
|
250
440
|
</IconButton>
|
|
251
441
|
<IconButton
|
|
252
|
-
size={
|
|
442
|
+
size={args.size}
|
|
253
443
|
aria-label="Secondary action"
|
|
254
444
|
priority="secondary"
|
|
255
445
|
type="default"
|
|
256
|
-
onClick={
|
|
446
|
+
onClick={fn()}
|
|
257
447
|
>
|
|
258
448
|
<Bank />
|
|
259
449
|
</IconButton>
|
|
260
450
|
<IconButton
|
|
261
|
-
size={
|
|
451
|
+
size={args.size}
|
|
262
452
|
aria-label="Tertiary action"
|
|
263
453
|
priority="tertiary"
|
|
264
454
|
type="default"
|
|
265
|
-
onClick={
|
|
455
|
+
onClick={fn()}
|
|
266
456
|
>
|
|
267
457
|
<Freeze />
|
|
268
458
|
</IconButton>
|
|
269
459
|
<IconButton
|
|
270
|
-
size={
|
|
460
|
+
size={args.size}
|
|
271
461
|
aria-label="Minimal action"
|
|
272
462
|
priority="minimal"
|
|
273
463
|
type="default"
|
|
274
|
-
onClick={
|
|
464
|
+
onClick={fn()}
|
|
275
465
|
>
|
|
276
466
|
<Edit />
|
|
277
467
|
</IconButton>
|
|
278
468
|
<IconButton
|
|
279
|
-
size={
|
|
469
|
+
size={args.size}
|
|
470
|
+
aria-label="Negative primary action"
|
|
471
|
+
priority="primary"
|
|
472
|
+
type="negative"
|
|
473
|
+
onClick={fn()}
|
|
474
|
+
>
|
|
475
|
+
<Cross />
|
|
476
|
+
</IconButton>
|
|
477
|
+
<IconButton
|
|
478
|
+
size={args.size}
|
|
479
|
+
aria-label="Negative secondary action"
|
|
480
|
+
priority="secondary"
|
|
481
|
+
type="negative"
|
|
482
|
+
onClick={fn()}
|
|
483
|
+
>
|
|
484
|
+
<Edit />
|
|
485
|
+
</IconButton>
|
|
486
|
+
<IconButton
|
|
487
|
+
size={args.size}
|
|
280
488
|
aria-label="Disabled action"
|
|
281
489
|
priority="primary"
|
|
282
490
|
type="default"
|
|
283
491
|
disabled
|
|
284
|
-
onClick={
|
|
492
|
+
onClick={fn()}
|
|
285
493
|
>
|
|
286
494
|
<Cross />
|
|
287
495
|
</IconButton>
|
|
@@ -292,10 +500,7 @@ export const SentimentAwareness: Story = {
|
|
|
292
500
|
},
|
|
293
501
|
parameters: {
|
|
294
502
|
docs: {
|
|
295
|
-
|
|
296
|
-
canvas: {
|
|
297
|
-
sourceState: 'hidden',
|
|
298
|
-
},
|
|
503
|
+
canvas: { sourceState: 'hidden' },
|
|
299
504
|
},
|
|
300
505
|
},
|
|
301
506
|
};
|