|
|
@@ -14,6 +14,7 @@ interface ControlsToolBarProps {
|
|
14
|
14
|
toolList: Array<ToolListItem>;
|
|
15
|
15
|
injectIconWrapStyle?: any;
|
|
16
|
16
|
injectIconStyle?: any;
|
|
|
17
|
+ injectIconTextStyle?: any;
|
|
17
|
18
|
}
|
|
18
|
19
|
|
|
19
|
20
|
export const ControlsToolBar = (props: ControlsToolBarProps) => {
|
|
|
@@ -23,14 +24,18 @@ export const ControlsToolBar = (props: ControlsToolBarProps) => {
|
|
23
|
24
|
toolList = [],
|
|
24
|
25
|
injectIconWrapStyle = {},
|
|
25
|
26
|
injectIconStyle = {},
|
|
|
27
|
+ injectIconTextStyle = {},
|
|
26
|
28
|
} = props;
|
|
27
|
29
|
const IconWrapStyle = {
|
|
|
30
|
+ display: 'flex',
|
|
|
31
|
+ alignItems: 'center',
|
|
28
|
32
|
cursor: "pointer",
|
|
29
|
33
|
textAlign: "center" as const,
|
|
30
|
|
- width: "42px",
|
|
|
34
|
+ minWidth: "42px",
|
|
31
|
35
|
...injectIconWrapStyle,
|
|
32
|
36
|
};
|
|
33
|
37
|
const IconStyle = { fontSize: "21px", ...injectIconStyle };
|
|
|
38
|
+ const IconTextStyle = { margin: "0 4px", ...injectIconTextStyle };
|
|
34
|
39
|
|
|
35
|
40
|
if (toolList.length < 1) {
|
|
36
|
41
|
return null;
|
|
|
@@ -46,6 +51,9 @@ export const ControlsToolBar = (props: ControlsToolBarProps) => {
|
|
46
|
51
|
onClick={i.onClick}
|
|
47
|
52
|
>
|
|
48
|
53
|
<i className={i.iconClass} style={IconStyle} />
|
|
|
54
|
+ {
|
|
|
55
|
+ i.text ? <span style={IconTextStyle}>{i.text}</span> : null
|
|
|
56
|
+ }
|
|
49
|
57
|
</div>
|
|
50
|
58
|
))
|
|
51
|
59
|
}
|