Browse Source

fix: 添加text的class自定义

Roxas 4 years ago
parent
commit
a8fc1c7e61

+ 1
- 0
eslib/Editor/index.d.ts View File

@@ -5,6 +5,7 @@ interface ToolListItem {
5 5
     key: any;
6 6
     color: string;
7 7
     iconClass: string;
8
+    iconTextClass: string;
8 9
     onClick: any;
9 10
     text?: string;
10 11
     render?: (i: ToolListItem, innerIcon: any, innerText: any, divWrapStyle: React.CSSProperties | undefined) => any;

+ 1
- 0
eslib/Editor/index.js View File

@@ -82,6 +82,7 @@ var ControlsToolBar = function ControlsToolBar(props) {
82 82
       style: IconStyle
83 83
     });
84 84
     var innerText = i.text ? React.createElement("span", {
85
+      className: i.iconTextClass,
85 86
       style: IconTextStyle
86 87
     }, i.text) : null;
87 88
 

+ 1
- 1
eslib/Editor/index.js.map
File diff suppressed because it is too large
View File


+ 1
- 0
lib/Editor/index.d.ts View File

@@ -5,6 +5,7 @@ interface ToolListItem {
5 5
     key: any;
6 6
     color: string;
7 7
     iconClass: string;
8
+    iconTextClass: string;
8 9
     onClick: any;
9 10
     text?: string;
10 11
     render?: (i: ToolListItem, innerIcon: any, innerText: any, divWrapStyle: React.CSSProperties | undefined) => any;

+ 1
- 0
lib/Editor/index.js View File

@@ -88,6 +88,7 @@ var ControlsToolBar = function ControlsToolBar(props) {
88 88
       style: IconStyle
89 89
     });
90 90
     var innerText = i.text ? React__default.createElement("span", {
91
+      className: i.iconTextClass,
91 92
       style: IconTextStyle
92 93
     }, i.text) : null;
93 94
 

+ 1
- 1
lib/Editor/index.js.map
File diff suppressed because it is too large
View File


+ 2
- 1
src/components/Editor/CommonTool/ControlsToolBar.tsx View File

@@ -6,6 +6,7 @@ export interface ToolListItem {
6 6
   key: any;
7 7
   color: string;
8 8
   iconClass: string;
9
+  iconTextClass: string;
9 10
   onClick: any;
10 11
   text?: string;
11 12
   render?: (i: ToolListItem, innerIcon: any, innerText: any, divWrapStyle: React.CSSProperties | undefined) => any;
@@ -48,7 +49,7 @@ export const ControlsToolBar = (props: ControlsToolBarProps) => {
48 49
     {
49 50
       toolList.map(i => {
50 51
         const innerIcon = <i className={i.iconClass} style={IconStyle} />;
51
-        const innerText = i.text ? <span style={IconTextStyle}>{i.text}</span> : null;
52
+        const innerText = i.text ? <span className={i.iconTextClass} style={IconTextStyle}>{i.text}</span> : null;
52 53
         const divWrapStyle = { color: i.color, ...IconWrapStyle };
53 54
         const wrapperDom = (
54 55
           <div

+ 1
- 2
stats.html
File diff suppressed because it is too large
View File