From 79f25d1107ab68e5f3e60c681d4f0bd639d7c3eb Mon Sep 17 00:00:00 2001 From: zombiej Date: Tue, 18 Dec 2018 11:02:09 +0800 Subject: [PATCH] fix spin style --- components/spin/__tests__/index.test.js | 2 +- components/spin/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/spin/__tests__/index.test.js b/components/spin/__tests__/index.test.js index cf223daa9a..69170b498c 100644 --- a/components/spin/__tests__/index.test.js +++ b/components/spin/__tests__/index.test.js @@ -14,7 +14,7 @@ describe('Spin', () => { .find('.ant-spin-nested-loading') .at(0) .prop('style'), - ).toBe(null); + ).toBeFalsy(); expect( wrapper .find('.ant-spin') diff --git a/components/spin/index.tsx b/components/spin/index.tsx index e2d0f06d2e..63aaeaf43a 100644 --- a/components/spin/index.tsx +++ b/components/spin/index.tsx @@ -137,7 +137,7 @@ class Spin extends React.Component { }; 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 { const divProps = omit(restProps, ['spinning', 'delay', 'indicator']); const spinElement = ( -
+
{renderIndicator(this.props)} {tip ?
{tip}
: null}