@@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
88 * WordPress dependencies
99 */
1010import { Component , createRef , renderToString } from '@wordpress/element' ;
11- import { Button , Icon } from '@wordpress/components' ;
11+ import { Button , Icon , Tooltip } from '@wordpress/components' ;
1212import { __ } from '@wordpress/i18n' ;
1313import { withSelect , withDispatch } from '@wordpress/data' ;
1414import { compose } from '@wordpress/compose' ;
@@ -236,23 +236,25 @@ class AMPPreview extends Component {
236236
237237 return (
238238 isEnabled && ! errorMessages . length && ! isStandardMode && (
239- < Button
240- className = "amp-editor-post-preview"
241- href = { href }
242- label = { __ ( 'Preview AMP' , 'amp' ) }
243- isSecondary
244- disabled = { ! isSaveable }
245- onClick = { this . openPreviewWindow }
246- ref = { this . buttonRef }
247- >
248- { ampFilledIcon ( { viewBox : '0 0 62 62' , width : 18 , height : 18 } ) }
249- < span className = "screen-reader-text" >
250- {
251- /* translators: accessibility text */
252- __ ( '(opens in a new tab)' , 'amp' )
253- }
254- </ span >
255- </ Button >
239+ < Tooltip text = { __ ( 'Preview AMP' , 'amp' ) } >
240+ < Button
241+ className = "amp-editor-post-preview"
242+ href = { href }
243+ label = { __ ( 'Preview AMP' , 'amp' ) }
244+ isSecondary
245+ disabled = { ! isSaveable }
246+ onClick = { this . openPreviewWindow }
247+ ref = { this . buttonRef }
248+ >
249+ { ampFilledIcon ( { viewBox : '0 0 62 62' , width : 18 , height : 18 } ) }
250+ < span className = "screen-reader-text" >
251+ {
252+ /* translators: accessibility text */
253+ __ ( '(opens in a new tab)' , 'amp' )
254+ }
255+ </ span >
256+ </ Button >
257+ </ Tooltip >
256258 )
257259 ) ;
258260 }
0 commit comments