@@ -7,7 +7,7 @@ import { addFilter } from '@wordpress/hooks';
7
7
* Internal dependencies
8
8
*/
9
9
import useGatherTweetstorm from './use-gather-tweetstorm' ;
10
- import { withNotices , Button , ToolbarGroup , Toolbar , Spinner } from '@wordpress/components' ;
10
+ import { withNotices , Button , ToolbarGroup , Spinner } from '@wordpress/components' ;
11
11
import { __ } from '@wordpress/i18n' ;
12
12
import './editor.scss' ;
13
13
import { BlockControls } from '@wordpress/editor' ;
@@ -42,44 +42,21 @@ const addTweetstormToTweets = blockSettings => {
42
42
< >
43
43
{ noticeUI }
44
44
< BlockControls >
45
- { /* @todo Fallback can be removed when WP 5.4 is the minimum supported version. */ }
46
- { ToolbarGroup ? (
47
- < ToolbarGroup className = "gathering-tweetstorms__embed-toolbar" >
48
- < Button
49
- className = "gathering-tweetstorms__embed-toolbar-button"
50
- onClick = { ( ) => unleashStorm ( url , noticeOperations ) }
51
- label = { __ (
52
- 'Import the entire Twitter thread directly into this post.' ,
53
- 'jetpack'
54
- ) }
55
- showTooltip = { true }
56
- disabled = { isGatheringStorm }
57
- >
58
- { __ ( 'Unroll' , 'jetpack' ) }
59
- </ Button >
60
- { isGatheringStorm && < Spinner /> }
61
- </ ToolbarGroup >
62
- ) : (
63
- < Toolbar
64
- className = "gathering-tweetstorms__embed-toolbar"
65
- controls = { [
66
- {
67
- title : __ (
68
- 'Import the entire Twitter thread directly into this post.' ,
69
- 'jetpack'
70
- ) ,
71
- onClick : ( ) => unleashStorm ( url , noticeOperations ) ,
72
- extraProps : {
73
- className : 'gathering-tweetstorms__embed-toolbar-button' ,
74
- children : __ ( 'Unroll' , 'jetpack' ) ,
75
- disabled : isGatheringStorm ,
76
- } ,
77
- } ,
78
- ] }
45
+ < ToolbarGroup className = "gathering-tweetstorms__embed-toolbar" >
46
+ < Button
47
+ className = "gathering-tweetstorms__embed-toolbar-button"
48
+ onClick = { ( ) => unleashStorm ( url , noticeOperations ) }
49
+ label = { __ (
50
+ 'Import the entire Twitter thread directly into this post.' ,
51
+ 'jetpack'
52
+ ) }
53
+ showTooltip = { true }
54
+ disabled = { isGatheringStorm }
79
55
>
80
- { isGatheringStorm && < Spinner /> }
81
- </ Toolbar >
82
- ) }
56
+ { __ ( 'Unroll' , 'jetpack' ) }
57
+ </ Button >
58
+ { isGatheringStorm && < Spinner /> }
59
+ </ ToolbarGroup >
83
60
</ BlockControls >
84
61
< CoreTweetEdit { ...props } />
85
62
</ >
0 commit comments