File tree Expand file tree Collapse file tree 3 files changed +20
-11
lines changed
plugin/assets/src/block-editor
components/layout-controls Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 6666 "columns" : {
6767 "type" : " object" ,
6868 "default" : {
69- "desktop" : 4 ,
69+ "desktop" : 5 ,
7070 "tablet" : 3 ,
7171 "mobile" : 1
7272 }
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import classNames from 'classnames';
2222/**
2323 * WordPress dependencies
2424 */
25- import { BaseControl , RangeControl } from '@wordpress/components' ;
25+ import { BaseControl , RangeControl , Tooltip } from '@wordpress/components' ;
2626import { useState } from '@wordpress/element' ;
2727import { __ } from '@wordpress/i18n' ;
2828
@@ -59,15 +59,16 @@ export default ( {
5959 { label }
6060 < div className = "components-base-control__label-actions components-base-control__layout-controls" >
6161 { DEVICES . map ( device => (
62- < button
63- key = { device . name }
64- className = { classNames ( '' , {
65- 'is-selected' : device . name === selectedDevice ,
66- } ) }
67- onClick = { ( ) => setSelectedDevice ( device . name ) }
68- >
69- < i className = "material-icons" > { device . icon } </ i >
70- </ button >
62+ < Tooltip text = { device . label } key = { device . name } >
63+ < button
64+ className = { classNames ( '' , {
65+ 'is-selected' : device . name === selectedDevice ,
66+ } ) }
67+ onClick = { ( ) => setSelectedDevice ( device . name ) }
68+ >
69+ < i className = "material-icons" > { device . icon } </ i >
70+ </ button >
71+ </ Tooltip >
7172 ) ) }
7273 </ div >
7374 </ BaseControl . VisualLabel >
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17+ /**
18+ * WordPress dependencies
19+ */
20+ import { __ } from '@wordpress/i18n' ;
21+
1722const NAMESPACE = '/wp/v2' ;
1823export const ENDPOINTS = {
1924 root : NAMESPACE ,
@@ -24,13 +29,16 @@ export const DEVICES = [
2429 {
2530 name : 'desktop' ,
2631 icon : 'computer' ,
32+ label : __ ( 'Layout Settings for Desktop' , 'material-design' ) ,
2733 } ,
2834 {
2935 name : 'tablet' ,
3036 icon : 'tablet' ,
37+ label : __ ( 'Layout Settings for Tablet' , 'material-design' ) ,
3138 } ,
3239 {
3340 name : 'mobile' ,
3441 icon : 'smartphone' ,
42+ label : __ ( 'Layout Settings for Mobile' , 'material-design' ) ,
3543 } ,
3644] ;
You can’t perform that action at this time.
0 commit comments