@atlaskit/editor-toolbar 0.0.1 → 0.0.2
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/CHANGELOG.md +9 -0
- package/examples/toolbar/examples/ExampleManuallyComposedToolbar.tsx +264 -138
- package/package.json +3 -3
- package/src/ui/ToolbarButton.tsx +6 -6
- package/src/ui/ToolbarDropdownDivider.tsx +17 -0
- package/src/ui/ToolbarDropdownItem.tsx +55 -41
- package/src/ui/ToolbarDropdownItemSection.tsx +19 -0
- package/src/ui/ToolbarNestedDropdownMenu.tsx +43 -0
- package/src/ui/ToolbarTooltip.tsx +4 -8
- package/src/ui/icons/AICasualIcon.tsx +2 -0
- package/src/ui/icons/AIChangeToneIcon.tsx +2 -0
- package/src/ui/icons/AIHeartIcon.tsx +2 -0
- package/src/ui/icons/AILengthenIcon.tsx +2 -0
- package/src/ui/icons/AIProfessionalIcon.tsx +2 -0
- package/src/ui/icons/AIShortenIcon.tsx +2 -0
- package/src/ui/icons/AISpellcheckIcon.tsx +2 -0
- package/src/ui/icons/AITranslateIcon.tsx +2 -0
- package/src/ui/icons/ClearFormattingIcon.tsx +2 -0
- package/src/ui/icons/NestedDropdownRightIcon.tsx +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#189216](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189216)
|
|
8
|
+
[`b4ba899b6cf55`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b4ba899b6cf55) -
|
|
9
|
+
[ux] ED-28546 add nested flyouts to ui primitive library
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 0.0.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -7,10 +7,19 @@ import { token } from '@atlaskit/tokens';
|
|
|
7
7
|
import { ColorIndicatorWrapper } from '../../../src/ui/ColorIndicatorWrapper';
|
|
8
8
|
import { AddIcon } from '../../../src/ui/icons/AddIcon';
|
|
9
9
|
import { AIAdjustLengthIcon } from '../../../src/ui/icons/AIAdjustLengthIcon';
|
|
10
|
+
import { AICasualIcon } from '../../../src/ui/icons/AICasualIcon';
|
|
11
|
+
import { AIChangeToneIcon } from '../../../src/ui/icons/AIChangeToneIcon';
|
|
10
12
|
import { AIChatIcon } from '../../../src/ui/icons/AIChatIcon';
|
|
11
13
|
import { AICommandIcon } from '../../../src/ui/icons/AICommandIcon';
|
|
14
|
+
import { AIHeartIcon } from '../../../src/ui/icons/AIHeartIcon';
|
|
15
|
+
import { AILenghtenIcon } from '../../../src/ui/icons/AILengthenIcon';
|
|
16
|
+
import { AIBriefcaseIcon } from '../../../src/ui/icons/AIProfessionalIcon';
|
|
17
|
+
import { AIShortenIcon } from '../../../src/ui/icons/AIShortenIcon';
|
|
18
|
+
import { AISpellcheckIcon } from '../../../src/ui/icons/AISpellcheckIcon';
|
|
19
|
+
import { AITranslateIcon } from '../../../src/ui/icons/AITranslateIcon';
|
|
12
20
|
import { AppsIcon } from '../../../src/ui/icons/AppsIcon';
|
|
13
21
|
import { BoldIcon } from '../../../src/ui/icons/BoldIcon';
|
|
22
|
+
import { ClearFormattingIcon } from '../../../src/ui/icons/ClearFormattingIcon';
|
|
14
23
|
import { CommentIcon } from '../../../src/ui/icons/CommentIcon';
|
|
15
24
|
import { HeadingFiveIcon } from '../../../src/ui/icons/HeadingFiveIcon';
|
|
16
25
|
import { HeadingFourIcon } from '../../../src/ui/icons/HeadingFourIcon';
|
|
@@ -23,6 +32,7 @@ import { LinkIcon } from '../../../src/ui/icons/LinkIcon';
|
|
|
23
32
|
import { ListBulletedIcon } from '../../../src/ui/icons/ListBulletedIcon';
|
|
24
33
|
import { ListNumberedIcon } from '../../../src/ui/icons/ListNumberedIcon';
|
|
25
34
|
import { MoreItemsIcon } from '../../../src/ui/icons/MoreItemsIcon';
|
|
35
|
+
import { NestedDropdownRightIcon } from '../../../src/ui/icons/NestedDropdownRightIcon';
|
|
26
36
|
import { PinIcon } from '../../../src/ui/icons/PinIcon';
|
|
27
37
|
import { PinnedIcon } from '../../../src/ui/icons/PinnedIcon';
|
|
28
38
|
import { QuoteIcon } from '../../../src/ui/icons/QuoteIcon';
|
|
@@ -32,9 +42,12 @@ import { Toolbar } from '../../../src/ui/Toolbar';
|
|
|
32
42
|
import { ToolbarButton } from '../../../src/ui/ToolbarButton';
|
|
33
43
|
import { ToolbarButtonGroup } from '../../../src/ui/ToolbarButtonGroup';
|
|
34
44
|
import { ToolbarDivider } from '../../../src/ui/ToolbarDivider';
|
|
45
|
+
import { ToolbarDropdownDivider } from '../../../src/ui/ToolbarDropdownDivider';
|
|
35
46
|
import { ToolbarDropdownItem } from '../../../src/ui/ToolbarDropdownItem';
|
|
47
|
+
import { ToolbarDropdownItemSection } from '../../../src/ui/ToolbarDropdownItemSection';
|
|
36
48
|
import { ToolbarDropdownMenu } from '../../../src/ui/ToolbarDropdownMenu';
|
|
37
49
|
import { ToolbarKeyboardShortcutHint } from '../../../src/ui/ToolbarKeyboardShortcutHint';
|
|
50
|
+
import { ToolbarNestedDropdownMenu } from '../../../src/ui/ToolbarNestedDropdownMenu';
|
|
38
51
|
import { ToolbarSection } from '../../../src/ui/ToolbarSection';
|
|
39
52
|
import { ToolbarTooltip } from '../../../src/ui/ToolbarTooltip';
|
|
40
53
|
|
|
@@ -57,67 +70,67 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
57
70
|
const [isRovoDisabled, setIsRovoDisabled] = useState(false);
|
|
58
71
|
const toggleRovoButton = () => {
|
|
59
72
|
setIsRovoDisabled(!isRovoDisabled);
|
|
60
|
-
}
|
|
73
|
+
};
|
|
61
74
|
|
|
62
75
|
const [isAdjustLengthDisabled, setIsAdjustLengthDisabled] = useState(false);
|
|
63
76
|
const toggleAdjustLengthButton = () => {
|
|
64
77
|
setIsAdjustLengthDisabled(!isAdjustLengthDisabled);
|
|
65
|
-
}
|
|
78
|
+
};
|
|
66
79
|
|
|
67
80
|
const [isTextStylesDisabled, setIsTextStylesDisabled] = useState(false);
|
|
68
81
|
const toggleTextStylesButton = () => {
|
|
69
82
|
setIsTextStylesDisabled(!isTextStylesDisabled);
|
|
70
|
-
}
|
|
83
|
+
};
|
|
71
84
|
|
|
72
85
|
const [isImproveWritingDisabled, setIsImproveWritingDisabled] = useState(false);
|
|
73
86
|
const toggleImproveWritingButton = () => {
|
|
74
87
|
setIsImproveWritingDisabled(!isImproveWritingDisabled);
|
|
75
|
-
}
|
|
88
|
+
};
|
|
76
89
|
|
|
77
90
|
const [isBoldDisabled, setIsBoldDisabled] = useState(false);
|
|
78
91
|
const toggleBoldStyle = () => {
|
|
79
92
|
setIsBoldDisabled(!isBoldDisabled);
|
|
80
|
-
}
|
|
93
|
+
};
|
|
81
94
|
|
|
82
95
|
const [isItalicDisabled, setIsItalicDisabled] = useState(false);
|
|
83
96
|
const toggleItalicStyle = () => {
|
|
84
97
|
setIsItalicDisabled(!isItalicDisabled);
|
|
85
|
-
}
|
|
98
|
+
};
|
|
86
99
|
|
|
87
100
|
const [isTextColorDisabled, setIsTextColorDisabled] = useState(false);
|
|
88
101
|
const toggleTextColorButton = () => {
|
|
89
102
|
setIsTextColorDisabled(!isTextColorDisabled);
|
|
90
|
-
}
|
|
103
|
+
};
|
|
91
104
|
|
|
92
105
|
const [isBulletedListDisabled, setIsBulletedListDisabled] = useState(false);
|
|
93
106
|
const toggleBulletedListButton = () => {
|
|
94
107
|
setIsBulletedListDisabled(!isBulletedListDisabled);
|
|
95
|
-
}
|
|
108
|
+
};
|
|
96
109
|
|
|
97
110
|
const [isNumberedListDisabled, setIsNumberedListDisabled] = useState(false);
|
|
98
111
|
const toggleNumberedListButton = () => {
|
|
99
112
|
setIsNumberedListDisabled(!isNumberedListDisabled);
|
|
100
|
-
}
|
|
113
|
+
};
|
|
101
114
|
|
|
102
115
|
const [isLinkDisabled, setIsLinkDisabled] = useState(false);
|
|
103
116
|
const toggleLinkButton = () => {
|
|
104
117
|
setIsLinkDisabled(!isLinkDisabled);
|
|
105
|
-
}
|
|
118
|
+
};
|
|
106
119
|
|
|
107
120
|
const [isCommentDisabled, setIsCommentDisabled] = useState(false);
|
|
108
121
|
const toggleCommentButton = () => {
|
|
109
122
|
setIsCommentDisabled(!isCommentDisabled);
|
|
110
|
-
}
|
|
123
|
+
};
|
|
111
124
|
|
|
112
125
|
const [isCreateJiraWorkItemDisabled, setIsCreateJiraWorkItemDisabled] = useState(false);
|
|
113
126
|
const toggleCreateJiraWorkItemButton = () => {
|
|
114
127
|
setIsCreateJiraWorkItemDisabled(!isCreateJiraWorkItemDisabled);
|
|
115
|
-
}
|
|
128
|
+
};
|
|
116
129
|
|
|
117
130
|
const [isAppsAndExtensionsDisabled, setIsAppsAndExtensionsDisabled] = useState(false);
|
|
118
131
|
const toggleAppsAndExtensionsButton = () => {
|
|
119
132
|
setIsAppsAndExtensionsDisabled(!isAppsAndExtensionsDisabled);
|
|
120
|
-
}
|
|
133
|
+
};
|
|
121
134
|
|
|
122
135
|
return (
|
|
123
136
|
<>
|
|
@@ -136,16 +149,89 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
136
149
|
</ToolbarButton>
|
|
137
150
|
</ToolbarTooltip>
|
|
138
151
|
<ToolbarDropdownMenu icon={MoreItemsIcon} label="More formatting" groupLocation="end">
|
|
139
|
-
<
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
152
|
+
<ToolbarDropdownItemSection>
|
|
153
|
+
<ToolbarNestedDropdownMenu
|
|
154
|
+
elemBefore={<AIAdjustLengthIcon label="Adjust length" />}
|
|
155
|
+
text="Adjust length"
|
|
156
|
+
elemAfter={<NestedDropdownRightIcon label={'Choose desired tone'}/>}
|
|
157
|
+
isDisabled={isAdjustLengthDisabled}
|
|
158
|
+
>
|
|
159
|
+
<ToolbarDropdownItemSection>
|
|
160
|
+
<ToolbarDropdownItem
|
|
161
|
+
elemBefore={<AIShortenIcon label="Make shorter" />}
|
|
162
|
+
onClick={onClick('Make shorter')}
|
|
163
|
+
>
|
|
164
|
+
Make shorter
|
|
165
|
+
</ToolbarDropdownItem>
|
|
166
|
+
<ToolbarDropdownItem
|
|
167
|
+
elemBefore={<AILenghtenIcon label="Make longer" />}
|
|
168
|
+
onClick={onClick('Make longer')}
|
|
169
|
+
>
|
|
170
|
+
Make longer
|
|
171
|
+
</ToolbarDropdownItem>
|
|
172
|
+
</ToolbarDropdownItemSection>
|
|
173
|
+
</ToolbarNestedDropdownMenu>
|
|
174
|
+
<ToolbarNestedDropdownMenu
|
|
175
|
+
elemBefore={<AIChangeToneIcon label="Change tone" />}
|
|
176
|
+
text="Change tone"
|
|
177
|
+
elemAfter={<NestedDropdownRightIcon label={'Choose desired tone'}/>}
|
|
178
|
+
>
|
|
179
|
+
<ToolbarDropdownItemSection>
|
|
180
|
+
<ToolbarDropdownItem
|
|
181
|
+
elemBefore={<AIBriefcaseIcon label="More professional" />}
|
|
182
|
+
onClick={onClick('More professional')}
|
|
183
|
+
>
|
|
184
|
+
More professional
|
|
185
|
+
</ToolbarDropdownItem>
|
|
186
|
+
<ToolbarDropdownItem
|
|
187
|
+
elemBefore={<AICasualIcon label="More casual" />}
|
|
188
|
+
onClick={onClick('More casual')}
|
|
189
|
+
>
|
|
190
|
+
More casual
|
|
191
|
+
</ToolbarDropdownItem>
|
|
192
|
+
<ToolbarDropdownItem
|
|
193
|
+
elemBefore={<AIHeartIcon label="More empathetic" />}
|
|
194
|
+
onClick={onClick('More empathetic')}
|
|
195
|
+
>
|
|
196
|
+
More empathetic
|
|
197
|
+
</ToolbarDropdownItem>
|
|
198
|
+
</ToolbarDropdownItemSection>
|
|
199
|
+
</ToolbarNestedDropdownMenu>
|
|
200
|
+
<ToolbarDropdownItem
|
|
201
|
+
elemBefore={<AISpellcheckIcon label="Fix spelling and grammar" />}
|
|
202
|
+
onClick={onClick('Fix spelling and grammar')}
|
|
203
|
+
>
|
|
204
|
+
Fix spelling and grammar
|
|
205
|
+
</ToolbarDropdownItem>
|
|
206
|
+
<ToolbarNestedDropdownMenu
|
|
207
|
+
elemBefore={<AITranslateIcon label="Translate" />}
|
|
208
|
+
text="Translate"
|
|
209
|
+
elemAfter={<NestedDropdownRightIcon label={'Choose language option'}/>}
|
|
210
|
+
>
|
|
211
|
+
<ToolbarDropdownItemSection>
|
|
212
|
+
<ToolbarDropdownItem
|
|
213
|
+
elemBefore={<AITranslateIcon label="Language 1" />}
|
|
214
|
+
onClick={onClick('Language 1')}
|
|
215
|
+
>
|
|
216
|
+
Language 1
|
|
217
|
+
</ToolbarDropdownItem>
|
|
218
|
+
<ToolbarDropdownItem
|
|
219
|
+
elemBefore={<AITranslateIcon label="Language 2" />}
|
|
220
|
+
onClick={onClick('More casual')}
|
|
221
|
+
>
|
|
222
|
+
Language 2
|
|
223
|
+
</ToolbarDropdownItem>
|
|
224
|
+
<ToolbarDropdownItem
|
|
225
|
+
elemBefore={<AITranslateIcon label="Language 3" />}
|
|
226
|
+
onClick={onClick('Language 3')}
|
|
227
|
+
>
|
|
228
|
+
Language 3
|
|
229
|
+
</ToolbarDropdownItem>
|
|
230
|
+
</ToolbarDropdownItemSection>
|
|
231
|
+
</ToolbarNestedDropdownMenu>
|
|
232
|
+
</ToolbarDropdownItemSection>
|
|
146
233
|
</ToolbarDropdownMenu>
|
|
147
234
|
</ToolbarButtonGroup>
|
|
148
|
-
|
|
149
235
|
<ToolbarButtonGroup>
|
|
150
236
|
<ToolbarTooltip content="Improve writing">
|
|
151
237
|
<ToolbarButton
|
|
@@ -182,78 +268,80 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
182
268
|
label="Text styles"
|
|
183
269
|
isDisabled={isTextStylesDisabled}
|
|
184
270
|
>
|
|
185
|
-
<
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
271
|
+
<ToolbarDropdownItemSection>
|
|
272
|
+
<ToolbarDropdownItem
|
|
273
|
+
elemBefore={<TextIcon label="Normal text" />}
|
|
274
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⌥0" />}
|
|
275
|
+
onClick={onClick('Normal text', onSetTextStyle('normal'))}
|
|
276
|
+
isSelected={textStyle === 'normal'}
|
|
277
|
+
textStyle="normal"
|
|
278
|
+
>
|
|
279
|
+
Normal text
|
|
280
|
+
</ToolbarDropdownItem>
|
|
281
|
+
<ToolbarDropdownItem
|
|
282
|
+
elemBefore={<HeadingOneIcon label="Heading One" />}
|
|
283
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⌥1" />}
|
|
284
|
+
onClick={onClick('Heading one', onSetTextStyle('heading1'))}
|
|
285
|
+
isSelected={textStyle === 'heading1'}
|
|
286
|
+
textStyle="heading1"
|
|
287
|
+
>
|
|
288
|
+
Heading 1
|
|
289
|
+
</ToolbarDropdownItem>
|
|
290
|
+
<ToolbarDropdownItem
|
|
291
|
+
elemBefore={<HeadingTwoIcon label="Heading Two" />}
|
|
292
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⌥2" />}
|
|
293
|
+
onClick={onClick('Heading two', onSetTextStyle('heading2'))}
|
|
294
|
+
isSelected={textStyle === 'heading2'}
|
|
295
|
+
textStyle="heading2"
|
|
296
|
+
>
|
|
297
|
+
Heading 2
|
|
298
|
+
</ToolbarDropdownItem>
|
|
299
|
+
<ToolbarDropdownItem
|
|
300
|
+
elemBefore={<HeadingThreeIcon label="Heading Three" />}
|
|
301
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⌥3" />}
|
|
302
|
+
onClick={onClick('Heading three', onSetTextStyle('heading3'))}
|
|
303
|
+
isSelected={textStyle === 'heading3'}
|
|
304
|
+
textStyle="heading3"
|
|
305
|
+
>
|
|
306
|
+
Heading 3
|
|
307
|
+
</ToolbarDropdownItem>
|
|
308
|
+
<ToolbarDropdownItem
|
|
309
|
+
elemBefore={<HeadingFourIcon label="Heading Four" />}
|
|
310
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⌥4" />}
|
|
311
|
+
onClick={onClick('Heading four', onSetTextStyle('heading4'))}
|
|
312
|
+
isSelected={textStyle === 'heading4'}
|
|
313
|
+
textStyle="heading4"
|
|
314
|
+
>
|
|
315
|
+
Heading 4
|
|
316
|
+
</ToolbarDropdownItem>
|
|
317
|
+
<ToolbarDropdownItem
|
|
318
|
+
elemBefore={<HeadingFiveIcon label="Heading Five" />}
|
|
319
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⌥5" />}
|
|
320
|
+
onClick={onClick('Heading five', onSetTextStyle('heading5'))}
|
|
321
|
+
isSelected={textStyle === 'heading5'}
|
|
322
|
+
textStyle="heading5"
|
|
323
|
+
>
|
|
324
|
+
Heading 5
|
|
325
|
+
</ToolbarDropdownItem>
|
|
326
|
+
<ToolbarDropdownItem
|
|
327
|
+
elemBefore={<HeadingSixIcon label="Heading Six" />}
|
|
328
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⌥6" />}
|
|
329
|
+
onClick={onClick('Heading six', onSetTextStyle('heading6'))}
|
|
330
|
+
isSelected={textStyle === 'heading6'}
|
|
331
|
+
textStyle="heading6"
|
|
332
|
+
>
|
|
333
|
+
Heading 6
|
|
334
|
+
</ToolbarDropdownItem>
|
|
335
|
+
<ToolbarDropdownItem
|
|
336
|
+
elemBefore={<QuoteIcon label="Quote" />}
|
|
337
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⌥9" />}
|
|
338
|
+
onClick={onClick('Quote', onSetTextStyle('quote'))}
|
|
339
|
+
isSelected={textStyle === 'quote'}
|
|
340
|
+
textStyle="normal"
|
|
341
|
+
>
|
|
342
|
+
Quote
|
|
343
|
+
</ToolbarDropdownItem>
|
|
344
|
+
</ToolbarDropdownItemSection>
|
|
257
345
|
</ToolbarDropdownMenu>
|
|
258
346
|
</ToolbarTooltip>
|
|
259
347
|
</ToolbarButtonGroup>
|
|
@@ -273,24 +361,36 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
273
361
|
/>
|
|
274
362
|
</ToolbarTooltip>
|
|
275
363
|
<ToolbarDropdownMenu icon={MoreItemsIcon} label="More formatting" groupLocation="end">
|
|
276
|
-
<
|
|
364
|
+
<ToolbarDropdownItemSection>
|
|
365
|
+
<ToolbarDropdownItem
|
|
277
366
|
elemBefore={<BoldIcon label="Bold" />}
|
|
278
367
|
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘B" />}
|
|
279
368
|
onClick={onClick('Bold', onToggleFormatting('bold'))}
|
|
280
369
|
isSelected={formatting.bold}
|
|
281
370
|
isDisabled={isBoldDisabled}
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
371
|
+
>
|
|
372
|
+
Bold
|
|
373
|
+
</ToolbarDropdownItem>
|
|
374
|
+
<ToolbarDropdownItem
|
|
375
|
+
elemBefore={<ItalicIcon label="Italic" />}
|
|
376
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘I" />}
|
|
377
|
+
onClick={onClick('Italic', onToggleFormatting('italic'))}
|
|
378
|
+
isSelected={formatting.italic}
|
|
379
|
+
isDisabled={isItalicDisabled}
|
|
380
|
+
>
|
|
381
|
+
Italic
|
|
382
|
+
</ToolbarDropdownItem>
|
|
383
|
+
</ToolbarDropdownItemSection>
|
|
384
|
+
<ToolbarDropdownDivider/>
|
|
385
|
+
<ToolbarDropdownItemSection>
|
|
386
|
+
<ToolbarDropdownItem
|
|
387
|
+
elemBefore={<ClearFormattingIcon label="Clear formatting" />}
|
|
388
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘\" />}
|
|
389
|
+
onClick={onClick('Clear formatting')}
|
|
390
|
+
>
|
|
391
|
+
Clear formatting
|
|
392
|
+
</ToolbarDropdownItem>
|
|
393
|
+
</ToolbarDropdownItemSection>
|
|
294
394
|
</ToolbarDropdownMenu>
|
|
295
395
|
</ToolbarButtonGroup>
|
|
296
396
|
|
|
@@ -312,18 +412,22 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
312
412
|
label="Text color"
|
|
313
413
|
isDisabled={isTextColorDisabled}
|
|
314
414
|
>
|
|
315
|
-
<
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
415
|
+
<ToolbarDropdownItemSection>
|
|
416
|
+
<ToolbarDropdownItem
|
|
417
|
+
elemBefore={<TextIcon label="Text color" />}
|
|
418
|
+
onClick={onClick('Text color')}
|
|
419
|
+
>
|
|
420
|
+
Text color
|
|
421
|
+
</ToolbarDropdownItem>
|
|
422
|
+
</ToolbarDropdownItemSection>
|
|
321
423
|
</ToolbarDropdownMenu>
|
|
322
424
|
</ToolbarTooltip>
|
|
323
425
|
</ToolbarButtonGroup>
|
|
324
426
|
|
|
325
427
|
<ToolbarButtonGroup>
|
|
326
|
-
<ToolbarTooltip
|
|
428
|
+
<ToolbarTooltip
|
|
429
|
+
content={listOrAlignment === 'numbered' ? 'Numbered list' : 'Bulleted list'}
|
|
430
|
+
>
|
|
327
431
|
<ToolbarButton
|
|
328
432
|
icon={listOrAlignment === 'numbered' ? ListNumberedIcon : ListBulletedIcon}
|
|
329
433
|
label={listOrAlignment === 'numbered' ? 'Numbered list' : 'Bulleted list'}
|
|
@@ -333,7 +437,9 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
333
437
|
)}
|
|
334
438
|
groupLocation="start"
|
|
335
439
|
isSelected={listOrAlignment !== 'none'}
|
|
336
|
-
isDisabled={
|
|
440
|
+
isDisabled={
|
|
441
|
+
listOrAlignment === 'numbered' ? isNumberedListDisabled : isBulletedListDisabled
|
|
442
|
+
}
|
|
337
443
|
/>
|
|
338
444
|
</ToolbarTooltip>
|
|
339
445
|
<ToolbarDropdownMenu
|
|
@@ -341,24 +447,26 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
341
447
|
label="Lists, indentation and alignment"
|
|
342
448
|
groupLocation="end"
|
|
343
449
|
>
|
|
344
|
-
<
|
|
450
|
+
<ToolbarDropdownItemSection>
|
|
451
|
+
<ToolbarDropdownItem
|
|
345
452
|
elemBefore={<ListBulletedIcon label="Bulleted list" />}
|
|
346
453
|
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⇧8" />}
|
|
347
454
|
onClick={onClick('Bulleted list', onToggleListOrAlignment('bulleted'))}
|
|
348
455
|
isSelected={listOrAlignment === 'bulleted'}
|
|
349
456
|
isDisabled={isBulletedListDisabled}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
457
|
+
>
|
|
458
|
+
Bulleted list
|
|
459
|
+
</ToolbarDropdownItem>
|
|
460
|
+
<ToolbarDropdownItem
|
|
461
|
+
elemBefore={<ListNumberedIcon label="Numbered list" />}
|
|
462
|
+
elemAfter={<ToolbarKeyboardShortcutHint shortcut="⌘⇧7" />}
|
|
463
|
+
onClick={onClick('Numbered list', onToggleListOrAlignment('numbered'))}
|
|
464
|
+
isSelected={listOrAlignment === 'numbered'}
|
|
465
|
+
isDisabled={isNumberedListDisabled}
|
|
466
|
+
>
|
|
467
|
+
Numbered list
|
|
468
|
+
</ToolbarDropdownItem>
|
|
469
|
+
</ToolbarDropdownItemSection>
|
|
362
470
|
</ToolbarDropdownMenu>
|
|
363
471
|
</ToolbarButtonGroup>
|
|
364
472
|
</ToolbarSection>
|
|
@@ -368,7 +476,12 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
368
476
|
<ToolbarSection>
|
|
369
477
|
<ToolbarButtonGroup>
|
|
370
478
|
<ToolbarTooltip content="Link">
|
|
371
|
-
<ToolbarButton
|
|
479
|
+
<ToolbarButton
|
|
480
|
+
icon={LinkIcon}
|
|
481
|
+
label="Link"
|
|
482
|
+
onClick={onClick('Link')}
|
|
483
|
+
isDisabled={isLinkDisabled}
|
|
484
|
+
/>
|
|
372
485
|
</ToolbarTooltip>
|
|
373
486
|
</ToolbarButtonGroup>
|
|
374
487
|
</ToolbarSection>
|
|
@@ -378,7 +491,12 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
378
491
|
<ToolbarSection>
|
|
379
492
|
<ToolbarButtonGroup>
|
|
380
493
|
<ToolbarTooltip content="Comment">
|
|
381
|
-
<ToolbarButton
|
|
494
|
+
<ToolbarButton
|
|
495
|
+
icon={CommentIcon}
|
|
496
|
+
label="Comment"
|
|
497
|
+
onClick={onClick('Comment')}
|
|
498
|
+
isDisabled={isCommentDisabled}
|
|
499
|
+
/>
|
|
382
500
|
</ToolbarTooltip>
|
|
383
501
|
</ToolbarButtonGroup>
|
|
384
502
|
</ToolbarSection>
|
|
@@ -388,14 +506,20 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
388
506
|
<ToolbarSection>
|
|
389
507
|
<ToolbarButtonGroup>
|
|
390
508
|
<ToolbarTooltip content="Apps and extensions">
|
|
391
|
-
<ToolbarDropdownMenu
|
|
392
|
-
|
|
509
|
+
<ToolbarDropdownMenu
|
|
510
|
+
icon={AppsIcon}
|
|
511
|
+
label="Apps and extensions"
|
|
512
|
+
isDisabled={isAppsAndExtensionsDisabled}
|
|
513
|
+
>
|
|
514
|
+
<ToolbarDropdownItemSection>
|
|
515
|
+
<ToolbarDropdownItem
|
|
393
516
|
elemBefore={<AddIcon label="Create Jira work item" />}
|
|
394
517
|
onClick={onClick('Create Jira work item')}
|
|
395
518
|
isDisabled={isCreateJiraWorkItemDisabled}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
519
|
+
>
|
|
520
|
+
Create Jira work item
|
|
521
|
+
</ToolbarDropdownItem>
|
|
522
|
+
</ToolbarDropdownItemSection>
|
|
399
523
|
</ToolbarDropdownMenu>
|
|
400
524
|
</ToolbarTooltip>
|
|
401
525
|
</ToolbarButtonGroup>
|
|
@@ -405,7 +529,9 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
405
529
|
|
|
406
530
|
<ToolbarSection>
|
|
407
531
|
<ToolbarButtonGroup>
|
|
408
|
-
<ToolbarTooltip
|
|
532
|
+
<ToolbarTooltip
|
|
533
|
+
content={pinning === 'pinned' ? 'Unpin the toolbar' : 'Pin the toolbar at the top'}
|
|
534
|
+
>
|
|
409
535
|
<ToolbarButton
|
|
410
536
|
icon={pinning === 'pinned' ? PinnedIcon : PinIcon}
|
|
411
537
|
label={pinning === 'pinned' ? 'Unpin toolbar' : 'Pin toolbar'}
|
|
@@ -423,9 +549,9 @@ export const ExampleManuallyComposedToolbar = () => {
|
|
|
423
549
|
Last action: ${lastAction || 'None'}
|
|
424
550
|
Text style: ${textStyle}
|
|
425
551
|
Formatting: ${Object.entries(formatting)
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
552
|
+
.filter(([, value]) => value)
|
|
553
|
+
.map(([key]) => key)
|
|
554
|
+
.join(', ')}
|
|
429
555
|
List/Align: ${listOrAlignment}
|
|
430
556
|
Pinning: ${pinning}
|
|
431
557
|
`}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.2",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"team": "Editor"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@atlaskit/badge": "^18.1.0",
|
|
27
27
|
"@atlaskit/button": "^23.2.0",
|
|
28
28
|
"@atlaskit/css": "^0.12.0",
|
|
29
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
30
|
-
"@atlaskit/icon": "^27.
|
|
29
|
+
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
30
|
+
"@atlaskit/icon": "^27.7.0",
|
|
31
31
|
"@atlaskit/icon-lab": "^5.2.0",
|
|
32
32
|
"@atlaskit/logo": "^19.5.0",
|
|
33
33
|
"@atlaskit/popup": "^4.3.0",
|
package/src/ui/ToolbarButton.tsx
CHANGED
|
@@ -111,7 +111,11 @@ export const ToolbarButton = forwardRef(
|
|
|
111
111
|
}: ToolbarButtonProps,
|
|
112
112
|
ref: Ref<HTMLButtonElement>,
|
|
113
113
|
) => {
|
|
114
|
-
const iconColor = isDisabled
|
|
114
|
+
const iconColor = isDisabled
|
|
115
|
+
? ICON_COLOR.disabled
|
|
116
|
+
: isSelected
|
|
117
|
+
? ICON_COLOR.selected
|
|
118
|
+
: ICON_COLOR.default;
|
|
115
119
|
return (
|
|
116
120
|
<Pressable
|
|
117
121
|
ref={ref}
|
|
@@ -132,11 +136,7 @@ export const ToolbarButton = forwardRef(
|
|
|
132
136
|
testId={testId}
|
|
133
137
|
isDisabled={isDisabled}
|
|
134
138
|
>
|
|
135
|
-
<IconComponent
|
|
136
|
-
label={label}
|
|
137
|
-
size="medium"
|
|
138
|
-
color={iconColor}
|
|
139
|
-
/>
|
|
139
|
+
<IconComponent label={label} size="medium" color={iconColor} />
|
|
140
140
|
{children}
|
|
141
141
|
</Pressable>
|
|
142
142
|
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { cssMap } from '@atlaskit/css';
|
|
4
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
6
|
+
|
|
7
|
+
const styles = cssMap({
|
|
8
|
+
divider: {
|
|
9
|
+
borderBottomColor: token('color.border'),
|
|
10
|
+
borderBottomStyle: 'solid',
|
|
11
|
+
borderBottomWidth: token('border.width'),
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const ToolbarDropdownDivider = () => {
|
|
16
|
+
return <Box xcss={styles.divider} />;
|
|
17
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, { type ReactNode } from 'react';
|
|
1
|
+
import React, { type ReactNode, forwardRef, type Ref } from 'react';
|
|
2
2
|
|
|
3
3
|
import { cssMap, cx } from '@atlaskit/css';
|
|
4
4
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
5
|
+
import type { CustomItemComponentProps } from '@atlaskit/menu/types';
|
|
5
6
|
import { Box, Pressable } from '@atlaskit/primitives/compiled';
|
|
6
7
|
import { token } from '@atlaskit/tokens';
|
|
7
8
|
|
|
@@ -72,14 +73,48 @@ const styles = cssMap({
|
|
|
72
73
|
},
|
|
73
74
|
});
|
|
74
75
|
|
|
76
|
+
export type CustomDropdownMenuItemButtonProps = CustomItemComponentProps & {
|
|
77
|
+
'aria-haspopup'?: boolean;
|
|
78
|
+
'aria-disabled'?: boolean;
|
|
79
|
+
'aria-pressed'?: boolean;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const CustomDropdownMenuItemButton = forwardRef<HTMLButtonElement, CustomDropdownMenuItemButtonProps>(({
|
|
83
|
+
children,
|
|
84
|
+
'data-testid': testId,
|
|
85
|
+
'aria-haspopup': ariaHasPopup,
|
|
86
|
+
'aria-disabled': ariaDisabled,
|
|
87
|
+
'aria-pressed': ariaPressed,
|
|
88
|
+
onClick,
|
|
89
|
+
tabIndex,
|
|
90
|
+
}, ref) =>
|
|
91
|
+
<Pressable
|
|
92
|
+
testId={testId}
|
|
93
|
+
xcss={cx(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled)}
|
|
94
|
+
onClick={onClick}
|
|
95
|
+
tabIndex={tabIndex}
|
|
96
|
+
aria-haspopup={ariaHasPopup}
|
|
97
|
+
aria-expanded={ariaHasPopup ? ariaPressed ? true : false : undefined}
|
|
98
|
+
aria-pressed={ariaPressed}
|
|
99
|
+
aria-disabled={ariaDisabled}
|
|
100
|
+
ref={ref}
|
|
101
|
+
>
|
|
102
|
+
{children}
|
|
103
|
+
</Pressable>
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
75
107
|
type ToolbarDropdownItemProps = {
|
|
76
|
-
onClick:
|
|
108
|
+
onClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
|
77
109
|
elemBefore?: ReactNode;
|
|
78
110
|
elemAfter?: ReactNode;
|
|
79
111
|
isSelected?: boolean;
|
|
80
112
|
children?: React.ReactNode;
|
|
81
113
|
textStyle?: TextStyle;
|
|
82
114
|
isDisabled?: boolean;
|
|
115
|
+
hasNestedDropdownMenu?: boolean;
|
|
116
|
+
triggerRef?: Ref<HTMLButtonElement>
|
|
117
|
+
testId?: string;
|
|
83
118
|
};
|
|
84
119
|
|
|
85
120
|
export const ToolbarDropdownItem = ({
|
|
@@ -90,42 +125,21 @@ export const ToolbarDropdownItem = ({
|
|
|
90
125
|
children,
|
|
91
126
|
textStyle = 'normal',
|
|
92
127
|
isDisabled,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
testId={testId}
|
|
112
|
-
xcss={cx(
|
|
113
|
-
styles.toolbarDropdownItem,
|
|
114
|
-
isDisabled ? styles.disabled : isSelected ? styles.selected : styles.enabled,
|
|
115
|
-
)}
|
|
116
|
-
isDisabled={isDisabled}
|
|
117
|
-
draggable={draggable}
|
|
118
|
-
onClick={onClick}
|
|
119
|
-
onDragStart={onDragStart}
|
|
120
|
-
onMouseDown={onMouseDown}
|
|
121
|
-
tabIndex={tabIndex}
|
|
122
|
-
ref={ref}
|
|
123
|
-
>
|
|
124
|
-
{children}
|
|
125
|
-
</Pressable>
|
|
126
|
-
)}
|
|
127
|
-
>
|
|
128
|
-
<Box xcss={styles[textStyle]}>{children}</Box>
|
|
129
|
-
</DropdownItem>
|
|
130
|
-
);
|
|
131
|
-
};
|
|
128
|
+
hasNestedDropdownMenu,
|
|
129
|
+
triggerRef,
|
|
130
|
+
testId,
|
|
131
|
+
}: ToolbarDropdownItemProps) =>
|
|
132
|
+
<DropdownItem
|
|
133
|
+
onClick={onClick}
|
|
134
|
+
elemBefore={elemBefore}
|
|
135
|
+
elemAfter={elemAfter}
|
|
136
|
+
isSelected={isSelected}
|
|
137
|
+
isDisabled={isDisabled}
|
|
138
|
+
aria-haspopup={hasNestedDropdownMenu}
|
|
139
|
+
aria-pressed={isSelected}
|
|
140
|
+
ref={triggerRef}
|
|
141
|
+
component={CustomDropdownMenuItemButton}
|
|
142
|
+
testId={testId}
|
|
143
|
+
>
|
|
144
|
+
<Box xcss={styles[textStyle]}>{children}</Box>
|
|
145
|
+
</DropdownItem>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import { cssMap } from '@atlaskit/css';
|
|
4
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
|
+
|
|
6
|
+
const styles = cssMap({
|
|
7
|
+
container: {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'column',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
type ToolbarDropdownItemSectionProps = {
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const ToolbarDropdownItemSection = ({ children }: ToolbarDropdownItemSectionProps) => {
|
|
18
|
+
return <Box xcss={styles.container}>{children}</Box>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
4
|
+
|
|
5
|
+
import { ToolbarDropdownItem } from './ToolbarDropdownItem';
|
|
6
|
+
|
|
7
|
+
type ToolbarNestedDropdownMenuProps = {
|
|
8
|
+
elemBefore: ReactNode;
|
|
9
|
+
elemAfter: ReactNode;
|
|
10
|
+
text?: string;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const ToolbarNestedDropdownMenu = ({
|
|
16
|
+
elemBefore,
|
|
17
|
+
text,
|
|
18
|
+
elemAfter,
|
|
19
|
+
children,
|
|
20
|
+
isDisabled,
|
|
21
|
+
}: ToolbarNestedDropdownMenuProps) => {
|
|
22
|
+
return (
|
|
23
|
+
<DropdownMenu<HTMLButtonElement>
|
|
24
|
+
placement="right-start"
|
|
25
|
+
trigger={(triggerProps) => (
|
|
26
|
+
<ToolbarDropdownItem
|
|
27
|
+
elemBefore={elemBefore}
|
|
28
|
+
elemAfter={elemAfter}
|
|
29
|
+
isSelected={triggerProps.isSelected}
|
|
30
|
+
onClick={triggerProps.onClick}
|
|
31
|
+
testId={triggerProps.testId}
|
|
32
|
+
triggerRef={triggerProps.triggerRef}
|
|
33
|
+
hasNestedDropdownMenu={true}
|
|
34
|
+
isDisabled={isDisabled}
|
|
35
|
+
>
|
|
36
|
+
{text}
|
|
37
|
+
</ToolbarDropdownItem>
|
|
38
|
+
)}
|
|
39
|
+
>
|
|
40
|
+
{children}
|
|
41
|
+
</DropdownMenu>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -3,14 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
4
|
|
|
5
5
|
type ToolbarTooltipProps = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
content: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export const ToolbarTooltip = ({ content, children }: ToolbarTooltipProps) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{children}
|
|
14
|
-
</Tooltip>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
11
|
+
return <Tooltip content={content}>{children}</Tooltip>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Icon from '@atlaskit/icon/core/chevron-right';
|
|
4
|
+
|
|
5
|
+
import { type IconComponent } from '../../types';
|
|
6
|
+
|
|
7
|
+
export const NestedDropdownRightIcon: IconComponent = ({
|
|
8
|
+
label,
|
|
9
|
+
testId,
|
|
10
|
+
color,
|
|
11
|
+
shouldRecommendSmallIcon,
|
|
12
|
+
spacing,
|
|
13
|
+
}) => (
|
|
14
|
+
<Icon
|
|
15
|
+
label={label}
|
|
16
|
+
testId={testId}
|
|
17
|
+
color={color}
|
|
18
|
+
shouldRecommendSmallIcon={shouldRecommendSmallIcon}
|
|
19
|
+
spacing={spacing}
|
|
20
|
+
size="small"
|
|
21
|
+
/>
|
|
22
|
+
);
|