Browse Source

chore: 迁移 progress iconfont

pull/361/head
elrrrrrrr 9 years ago
parent
commit
b9fa8d1a45
  1. 3
      components/popconfirm/index.jsx
  2. 5
      components/progress/demo/circle-dynamic.md
  3. 5
      components/progress/demo/dynamic.md
  4. 9
      components/progress/index.jsx

3
components/popconfirm/index.jsx

@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import Tooltip from 'rc-tooltip'; import Tooltip from 'rc-tooltip';
import Icon from '../iconfont';
const prefixCls = 'ant-popover'; const prefixCls = 'ant-popover';
export default React.createClass({ export default React.createClass({
@ -41,7 +42,7 @@ export default React.createClass({
const overlay = <div> const overlay = <div>
<div className={prefixCls + '-content'}> <div className={prefixCls + '-content'}>
<p className={prefixCls + '-message'}> <p className={prefixCls + '-message'}>
<i className="anticon anticon-exclamation-circle"></i> <Icon type="exclamation-circle" />
{this.props.title} {this.props.title}
</p> </p>

5
components/progress/demo/circle-dynamic.md

@ -8,6 +8,7 @@
````jsx ````jsx
var ProgressCircle = antd.Progress.Circle; var ProgressCircle = antd.Progress.Circle;
var Icon = antd.Icon;
var MyProgress = React.createClass({ var MyProgress = React.createClass({
getInitialState() { getInitialState() {
@ -34,10 +35,10 @@ var MyProgress = React.createClass({
<ProgressCircle percent={this.state.percent} /> <ProgressCircle percent={this.state.percent} />
<div className="ant-btn-group"> <div className="ant-btn-group">
<button className="ant-btn ant-btn-ghost" onClick={this.decline}> <button className="ant-btn ant-btn-ghost" onClick={this.decline}>
<i className="anticon anticon-minus"></i> <Icon type="minus" />
</button> </button>
<button className="ant-btn ant-btn-ghost" onClick={this.increase}> <button className="ant-btn ant-btn-ghost" onClick={this.increase}>
<i className="anticon anticon-plus"></i> <Icon type="plus" />
</button> </button>
</div> </div>
</div>; </div>;

5
components/progress/demo/dynamic.md

@ -8,6 +8,7 @@
````jsx ````jsx
var Progress = antd.Progress.Line; var Progress = antd.Progress.Line;
var Icon = antd.Icon;
var MyProgress = React.createClass({ var MyProgress = React.createClass({
getInitialState() { getInitialState() {
@ -34,10 +35,10 @@ var MyProgress = React.createClass({
<Progress percent={this.state.percent} /> <Progress percent={this.state.percent} />
<div className="ant-btn-group"> <div className="ant-btn-group">
<button className="ant-btn ant-btn-ghost" onClick={this.decline}> <button className="ant-btn ant-btn-ghost" onClick={this.decline}>
<i className="anticon anticon-minus"></i> <Icon type="minus" />
</button> </button>
<button className="ant-btn ant-btn-ghost" onClick={this.increase}> <button className="ant-btn ant-btn-ghost" onClick={this.increase}>
<i className="anticon anticon-plus"></i> <Icon type="plus" />
</button> </button>
</div> </div>
</div>; </div>;

9
components/progress/index.jsx

@ -1,6 +1,7 @@
import {Circle as Progresscircle} from 'rc-progress'; import {Circle as Progresscircle} from 'rc-progress';
import React from 'react'; import React from 'react';
import assign from 'object-assign'; import assign from 'object-assign';
import Icon from '../iconfont';
const prefixCls = 'ant-progress'; const prefixCls = 'ant-progress';
@ -38,13 +39,13 @@ let Line = React.createClass({
if (props.status === 'exception') { if (props.status === 'exception') {
progressInfo = ( progressInfo = (
<span className={prefixCls + '-line-text'}> <span className={prefixCls + '-line-text'}>
<i className="anticon anticon-exclamation-circle"></i> <Icon type="exclamation-circle" />
</span> </span>
); );
} else if (props.status === 'success') { } else if (props.status === 'success') {
progressInfo = ( progressInfo = (
<span className={prefixCls + '-line-text'}> <span className={prefixCls + '-line-text'}>
<i className="anticon anticon-check-circle"></i> <Icon type="exclamation-circle" />
</span> </span>
); );
} else { } else {
@ -98,13 +99,13 @@ let Circle = React.createClass({
if (props.status === 'exception') { if (props.status === 'exception') {
progressInfo = ( progressInfo = (
<span className={prefixCls + '-circle-text'}> <span className={prefixCls + '-circle-text'}>
<i className="anticon anticon-exclamation"></i> <Icon type="exclamation" />
</span> </span>
); );
} else if (props.status === 'success') { } else if (props.status === 'success') {
progressInfo = ( progressInfo = (
<span className={prefixCls + '-circle-text'}> <span className={prefixCls + '-circle-text'}>
<i className="anticon anticon-check"></i> <Icon type="check" />
</span> </span>
); );
} else { } else {

Loading…
Cancel
Save