@@ -4,42 +4,71 @@ import {
4
4
ColorPicker ,
5
5
FontSelector ,
6
6
Numeric ,
7
- Radio ,
8
7
PlotlySection ,
9
8
UpdateMenuAccordion ,
10
9
UpdateMenuButtons ,
10
+ VisibilitySelect ,
11
+ Radio ,
11
12
} from '../components' ;
12
13
13
14
const StyleUpdateMenusPanel = ( props , { localize : _ } ) => (
14
15
< UpdateMenuAccordion >
15
- < Radio
16
+ < VisibilitySelect
16
17
attr = "visible"
17
18
options = { [
18
19
{ label : _ ( 'Show' ) , value : true } ,
19
20
{ label : _ ( 'Hide' ) , value : false } ,
20
21
] }
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 >
43
72
</ UpdateMenuAccordion >
44
73
) ;
45
74
0 commit comments