MCPcopy Create free account
hub / github.com/ElemeFE/element-react / render

Method render

src/progress/Progress.jsx:80–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78 }
79
80 render(): React.DOM {
81 const {
82 type,
83 percentage,
84 status,
85 strokeWidth,
86 textInside,
87 width,
88 showText
89 } = this.props;
90 let progress;
91 if (type === 'line') {
92 progress = (
93 <div className="el-progress-bar">
94 <div
95 className="el-progress-bar__outer"
96 style={{ height: `${strokeWidth}px` }}
97 >
98 <div
99 className="el-progress-bar__inner"
100 style={{ width: `${percentage}%` }}
101 >
102 {showText &&
103 textInside &&
104 <div className="el-progress-bar__innerText">
105 {`${percentage}%`}
106 </div>}
107 </div>
108 </div>
109 </div>
110 );
111 } else {
112 progress = (
113 <div
114 className="el-progress-circle"
115 style={{ height: `${width}px`, width: `${width}px` }}
116 >
117 <svg viewBox="0 0 100 100">
118 <path
119 className="el-progress-circle__track"
120 d={this.trackPath()}
121 stroke="#e5e9f2"
122 strokeWidth={this.relativeStrokeWidth()}
123 fill="none"
124 />
125 <path
126 className="el-progress-circle__path"
127 d={this.trackPath()}
128 strokeLinecap="round"
129 stroke={this.stroke()}
130 strokeWidth={this.relativeStrokeWidth()}
131 fill="none"
132 style={this.circlePathStyle()}
133 />
134 </svg>
135 </div>
136 );
137 }

Callers

nothing calls this directly

Calls 8

trackPathMethod · 0.95
relativeStrokeWidthMethod · 0.95
strokeMethod · 0.95
circlePathStyleMethod · 0.95
progressTextSizeMethod · 0.95
iconClassMethod · 0.95
styleMethod · 0.80
classNameMethod · 0.80

Tested by

no test coverage detected