Skip to content

Commit

Permalink
fix: spin should mask content, close: ant-design#3091
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed Sep 20, 2016
1 parent 3958eb4 commit 9b99c38
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion components/button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import classNames from 'classnames';
import { findDOMNode } from 'react-dom';
import Icon from '../icon';
Expand Down
2 changes: 1 addition & 1 deletion components/spin/demo/nested.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
order: 3
title:
title:
zh-CN: 卡片加载中
en-US: Embedded mode
---
Expand Down
2 changes: 1 addition & 1 deletion components/spin/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { PropTypes } from 'react';
import { findDOMNode } from 'react-dom';
import classNames from 'classnames';
Expand Down
33 changes: 26 additions & 7 deletions components/spin/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,34 @@

&-nested-loading & {
position: absolute;
top: 50%;
height: 20px;
line-height: 20px;
margin-top: -10px;
z-index: 4;
text-align: center;
height: 100%;
width: 100%;
z-index: 4;
&-dot {
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
margin: -@spin-dot-size / 2;
}

&-sm .@{spin-prefix-cls}-dot {
margin: -@spin-dot-size-sm / 2;
}
&-lg .@{spin-prefix-cls}-dot {
margin: -@spin-dot-size-lg / 2;
}

&-text {
position: absolute;
top: 50%;
width: 100%;
padding-top: @spin-dot-size / 2;
}
&-sm &-text {
padding-top: @spin-dot-size-sm / 2;
}
&-lg &-text {
padding-top: @spin-dot-size-lg / 2;
}
}

Expand Down

0 comments on commit 9b99c38

Please sign in to comment.