Skip to content

Commit

Permalink
fix alert loading style in nested loading (#1570)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpylua authored Nov 26, 2020
1 parent 9694740 commit 6b03490
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 7 additions & 7 deletions packages/zent/assets/loading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
left: 0;
width: 100%;
height: 100%;

> .zent-loading-icon-and-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}

&.zent-loading--has-children {
.zent-loading-mask {
@include theme-color(background-color, stroke, 9, 0.5);
}
}

.zent-loading-icon-and-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}

.zent-loading--inline {
Expand Down
7 changes: 6 additions & 1 deletion packages/zent/src/alert/demos/loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ en-US:
---

```jsx
import { Alert } from 'zent';
import { Alert, BlockLoading } from 'zent';

ReactDOM.render(
<div className="zent-alert-example">
<Alert type="info" loading>
{i18n.content}
</Alert>
<BlockLoading>
<Alert type="info" loading>
{i18n.content}
</Alert>
</BlockLoading>
</div>,
mountNode
);
Expand Down

0 comments on commit 6b03490

Please sign in to comment.