[new feature] Button: add loading-size prop (#2854)

This commit is contained in:
neverland
2019-02-26 19:35:59 +08:00
committed by GitHub
parent c3cf74cda0
commit 5cb0edbf39
5 changed files with 27 additions and 1 deletions
@@ -0,0 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`loading size 1`] = `
<button class="van-button van-button--default van-button--normal van-button--loading">
<div class="van-loading van-loading--circular van-loading" style="color: rgb(201, 201, 201); width: 10px; height: 10px;"><span class="van-loading__spinner van-loading__spinner--circular"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
</button>
`;
+12
View File
@@ -0,0 +1,12 @@
import { mount } from '../../../test/utils';
import Button from '..';
test('loading size', () => {
const wrapper = mount(Button, {
propsData: {
loading: true,
loadingSize: '10px'
}
});
expect(wrapper).toMatchSnapshot();
});