@@ -4,42 +4,71 @@ import {
44 ColorPicker ,
55 FontSelector ,
66 Numeric ,
7- Radio ,
87 PlotlySection ,
98 UpdateMenuAccordion ,
109 UpdateMenuButtons ,
10+ VisibilitySelect ,
11+ Radio ,
1112} from '../components' ;
1213
1314const StyleUpdateMenusPanel = ( props , { localize : _ } ) => (
1415 < UpdateMenuAccordion >
15- < Radio
16+ < VisibilitySelect
1617 attr = "visible"
1718 options = { [
1819 { label : _ ( 'Show' ) , value : true } ,
1920 { label : _ ( 'Hide' ) , value : false } ,
2021 ] }
21- />
22- < PlotlySection name = { _ ( 'Button Labels' ) } >
23- < UpdateMenuButtons attr = "buttons" />
24- </ PlotlySection >
25- < PlotlySection name = { _ ( 'Background' ) } >
26- < ColorPicker label = { _ ( 'Color' ) } attr = "bgcolor" />
27- </ PlotlySection >
28- < PlotlySection name = { _ ( 'Font' ) } >
29- < FontSelector label = { _ ( 'Typeface' ) } attr = "font.family" />
30- < Numeric label = { _ ( 'Size' ) } attr = "font.size" />
31- < ColorPicker label = { _ ( 'Color' ) } attr = "font.color" />
32- </ PlotlySection >
33- < PlotlySection name = { _ ( 'Border' ) } >
34- < Numeric label = { _ ( 'Width' ) } attr = "borderwidth" />
35- < ColorPicker label = { _ ( 'Color' ) } attr = "bordercolor" />
36- </ PlotlySection >
37- < PlotlySection name = { _ ( 'Padding' ) } >
38- < Numeric label = { _ ( 'Top' ) } attr = "pad.t" units = "px" />
39- < Numeric label = { _ ( 'Bottom' ) } attr = "pad.b" units = "px" />
40- < Numeric label = { _ ( 'Left' ) } attr = "pad.l" units = "px" />
41- < Numeric label = { _ ( 'Right' ) } attr = "pad.r" units = "px" />
42- </ PlotlySection >
22+ showOn = { true }
23+ >
24+ < PlotlySection name = { _ ( 'Button Labels' ) } >
25+ < UpdateMenuButtons attr = "buttons" />
26+ </ PlotlySection >
27+ < PlotlySection name = { _ ( 'Background' ) } >
28+ < ColorPicker label = { _ ( 'Color' ) } attr = "bgcolor" />
29+ </ PlotlySection >
30+ < PlotlySection name = { _ ( 'Font' ) } >
31+ < FontSelector label = { _ ( 'Typeface' ) } attr = "font.family" />
32+ < Numeric label = { _ ( 'Size' ) } attr = "font.size" />
33+ < ColorPicker label = { _ ( 'Color' ) } attr = "font.color" />
34+ </ PlotlySection >
35+ < PlotlySection name = { _ ( 'Border' ) } >
36+ < Numeric label = { _ ( 'Width' ) } attr = "borderwidth" />
37+ < ColorPicker label = { _ ( 'Color' ) } attr = "bordercolor" />
38+ </ PlotlySection >
39+
40+ < PlotlySection name = { _ ( 'Horizontal Positioning' ) } attr = { 'x' } >
41+ < Numeric label = { _ ( 'Position' ) } attr = { 'x' } showSlider step = { 0.02 } />
42+ < Radio
43+ label = { _ ( 'Anchor' ) }
44+ attr = { 'xanchor' }
45+ options = { [
46+ { label : _ ( 'Left' ) , value : 'left' } ,
47+ { label : _ ( 'Center' ) , value : 'center' } ,
48+ { label : _ ( 'Right' ) , value : 'right' } ,
49+ ] }
50+ />
51+ </ PlotlySection >
52+ < PlotlySection name = { _ ( 'Vertical Positioning' ) } attr = { 'y' } >
53+ < Numeric label = { _ ( 'Position' ) } attr = { 'y' } showSlider step = { 0.02 } />
54+ < Radio
55+ label = { _ ( 'Anchor' ) }
56+ attr = { 'yanchor' }
57+ options = { [
58+ { label : _ ( 'Top' ) , value : 'top' } ,
59+ { label : _ ( 'Middle' ) , value : 'middle' } ,
60+ { label : _ ( 'Bottom' ) , value : 'bottom' } ,
61+ ] }
62+ />
63+ </ PlotlySection >
64+
65+ < PlotlySection name = { _ ( 'Padding' ) } >
66+ < Numeric label = { _ ( 'Top' ) } attr = "pad.t" units = "px" />
67+ < Numeric label = { _ ( 'Bottom' ) } attr = "pad.b" units = "px" />
68+ < Numeric label = { _ ( 'Left' ) } attr = "pad.l" units = "px" />
69+ < Numeric label = { _ ( 'Right' ) } attr = "pad.r" units = "px" />
70+ </ PlotlySection >
71+ </ VisibilitySelect >
4372 </ UpdateMenuAccordion >
4473) ;
4574
0 commit comments