File tree 4 files changed +29
-35
lines changed
block-editor/src/components/spacing-sizes-control
border-box-control/border-box-control-linked-button
4 files changed +29
-35
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
2
* WordPress dependencies
3
3
*/
4
- import { Button , Tooltip } from '@wordpress/components' ;
4
+ import { Button } from '@wordpress/components' ;
5
5
import { link , linkOff } from '@wordpress/icons' ;
6
6
import { __ } from '@wordpress/i18n' ;
7
7
8
8
export default function LinkedButton ( { isLinked, ...props } ) {
9
9
const label = isLinked ? __ ( 'Unlink sides' ) : __ ( 'Link sides' ) ;
10
10
11
11
return (
12
- < Tooltip text = { label } >
13
- < Button
14
- { ...props }
15
- size = "small"
16
- icon = { isLinked ? link : linkOff }
17
- iconSize = { 24 }
18
- aria-label = { label }
19
- />
20
- </ Tooltip >
12
+ < Button
13
+ { ...props }
14
+ size = "small"
15
+ icon = { isLinked ? link : linkOff }
16
+ iconSize = { 24 }
17
+ label = { label }
18
+ />
21
19
) ;
22
20
}
Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Enhancements
6
+
7
+ - ` BorderBoxControl ` , ` BoxControl ` : Remove ` Tooltip ` component from linked button ([ #68498 ] ( https://github.com/WordPress/gutenberg/pull/68498 ) ).
8
+
5
9
### Internal
6
10
7
11
- ` BoxControl ` : Add runtime check for presets and presetKey ([ #68385 ] ( https://github.com/WordPress/gutenberg/pull/68385 ) ).
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ import { __ } from '@wordpress/i18n';
8
8
* Internal dependencies
9
9
*/
10
10
import Button from '../../button' ;
11
- import Tooltip from '../../tooltip' ;
12
- import { View } from '../../view' ;
13
11
import type { WordPressComponentProps } from '../../context' ;
14
12
import { contextConnect } from '../../context' ;
15
13
import { useBorderBoxControlLinkedButton } from './hook' ;
@@ -25,18 +23,15 @@ const BorderBoxControlLinkedButton = (
25
23
const label = isLinked ? __ ( 'Unlink sides' ) : __ ( 'Link sides' ) ;
26
24
27
25
return (
28
- < Tooltip text = { label } >
29
- < View className = { className } >
30
- < Button
31
- { ...buttonProps }
32
- size = "small"
33
- icon = { isLinked ? link : linkOff }
34
- iconSize = { 24 }
35
- aria-label = { label }
36
- ref = { forwardedRef }
37
- />
38
- </ View >
39
- </ Tooltip >
26
+ < Button
27
+ { ...buttonProps }
28
+ size = "small"
29
+ icon = { isLinked ? link : linkOff }
30
+ iconSize = { 24 }
31
+ label = { label }
32
+ ref = { forwardedRef }
33
+ className = { className }
34
+ />
40
35
) ;
41
36
} ;
42
37
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import { __ } from '@wordpress/i18n';
8
8
* Internal dependencies
9
9
*/
10
10
import Button from '../button' ;
11
- import Tooltip from '../tooltip' ;
12
11
13
12
export default function LinkedButton ( {
14
13
isLinked,
@@ -17,15 +16,13 @@ export default function LinkedButton( {
17
16
const label = isLinked ? __ ( 'Unlink sides' ) : __ ( 'Link sides' ) ;
18
17
19
18
return (
20
- < Tooltip text = { label } >
21
- < Button
22
- { ...props }
23
- className = "component-box-control__linked-button"
24
- size = "small"
25
- icon = { isLinked ? link : linkOff }
26
- iconSize = { 24 }
27
- aria-label = { label }
28
- />
29
- </ Tooltip >
19
+ < Button
20
+ { ...props }
21
+ className = "component-box-control__linked-button"
22
+ size = "small"
23
+ icon = { isLinked ? link : linkOff }
24
+ iconSize = { 24 }
25
+ label = { label }
26
+ />
30
27
) ;
31
28
}
You can’t perform that action at this time.
0 commit comments