mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
fix spin style
This commit is contained in:
parent
9a386e7336
commit
79f25d1107
@ -14,7 +14,7 @@ describe('Spin', () => {
|
||||
.find('.ant-spin-nested-loading')
|
||||
.at(0)
|
||||
.prop('style'),
|
||||
).toBe(null);
|
||||
).toBeFalsy();
|
||||
expect(
|
||||
wrapper
|
||||
.find('.ant-spin')
|
||||
|
@ -137,7 +137,7 @@ class Spin extends React.Component<SpinProps, SpinState> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { className, size, prefixCls, tip, wrapperClassName, ...restProps } = this.props;
|
||||
const { className, size, prefixCls, tip, wrapperClassName, style, ...restProps } = this.props;
|
||||
const { spinning } = this.state;
|
||||
|
||||
const spinClassName = classNames(
|
||||
@ -155,7 +155,7 @@ class Spin extends React.Component<SpinProps, SpinState> {
|
||||
const divProps = omit(restProps, ['spinning', 'delay', 'indicator']);
|
||||
|
||||
const spinElement = (
|
||||
<div {...divProps} className={spinClassName}>
|
||||
<div {...divProps} style={style} className={spinClassName}>
|
||||
{renderIndicator(this.props)}
|
||||
{tip ? <div className={`${prefixCls}-text`}>{tip}</div> : null}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user