Skip to content

Commit 0e36fbc

Browse files
committed
fix(Button): loading button of <a> should vertical align center
1 parent 4fb3282 commit 0e36fbc

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/button/demo/component.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ ReactDOM.render(<Box direction="row" spacing={20} >
2828
<Button {...props} type="primary">alibaba.com</Button>
2929
<Button {...props} type="secondary">alibaba.com</Button>
3030
<Button {...props} type="normal">alibaba.com</Button>
31+
<Button {...props} loading>alibaba.com loading</Button>
3132
</Box>, mountNode);
3233
````

src/button/main.scss

+8
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,14 @@
415415
visibility: visible;
416416
animation: loadingCircle 2s infinite linear;
417417
}
418+
&:after {
419+
content: '';
420+
display: inline-block;
421+
position: static;
422+
height: 100%;
423+
width: 0;
424+
vertical-align: middle;
425+
}
418426
}
419427

420428
/* custom loading */

0 commit comments

Comments
 (0)