Browse Source

fix: 添加text的class自定义

Roxas 4 years ago
parent
commit
a8fc1c7e61

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

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

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

82
       style: IconStyle
82
       style: IconStyle
83
     });
83
     });
84
     var innerText = i.text ? React.createElement("span", {
84
     var innerText = i.text ? React.createElement("span", {
85
+      className: i.iconTextClass,
85
       style: IconTextStyle
86
       style: IconTextStyle
86
     }, i.text) : null;
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
     key: any;
5
     key: any;
6
     color: string;
6
     color: string;
7
     iconClass: string;
7
     iconClass: string;
8
+    iconTextClass: string;
8
     onClick: any;
9
     onClick: any;
9
     text?: string;
10
     text?: string;
10
     render?: (i: ToolListItem, innerIcon: any, innerText: any, divWrapStyle: React.CSSProperties | undefined) => any;
11
     render?: (i: ToolListItem, innerIcon: any, innerText: any, divWrapStyle: React.CSSProperties | undefined) => any;

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

88
       style: IconStyle
88
       style: IconStyle
89
     });
89
     });
90
     var innerText = i.text ? React__default.createElement("span", {
90
     var innerText = i.text ? React__default.createElement("span", {
91
+      className: i.iconTextClass,
91
       style: IconTextStyle
92
       style: IconTextStyle
92
     }, i.text) : null;
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
   key: any;
6
   key: any;
7
   color: string;
7
   color: string;
8
   iconClass: string;
8
   iconClass: string;
9
+  iconTextClass: string;
9
   onClick: any;
10
   onClick: any;
10
   text?: string;
11
   text?: string;
11
   render?: (i: ToolListItem, innerIcon: any, innerText: any, divWrapStyle: React.CSSProperties | undefined) => any;
12
   render?: (i: ToolListItem, innerIcon: any, innerText: any, divWrapStyle: React.CSSProperties | undefined) => any;
48
     {
49
     {
49
       toolList.map(i => {
50
       toolList.map(i => {
50
         const innerIcon = <i className={i.iconClass} style={IconStyle} />;
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
         const divWrapStyle = { color: i.color, ...IconWrapStyle };
53
         const divWrapStyle = { color: i.color, ...IconWrapStyle };
53
         const wrapperDom = (
54
         const wrapperDom = (
54
           <div
55
           <div

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