feat(Switch): support number type of size prop (#4913)

This commit is contained in:
neverland
2019-11-04 17:29:56 +08:00
committed by GitHub
parent 7948b59063
commit 9ace3320b8
5 changed files with 20 additions and 4 deletions
@@ -5,3 +5,9 @@ exports[`inactive-color prop 1`] = `
<div class="van-switch__node"></div>
</div>
`;
exports[`size prop 1`] = `
<div role="switch" aria-checked="false" class="van-switch" style="font-size: 20px;">
<div class="van-switch__node"></div>
</div>
`;
+10
View File
@@ -72,3 +72,13 @@ test('inactive-color prop', () => {
expect(wrapper).toMatchSnapshot();
});
test('size prop', () => {
const wrapper = mount(Switch, {
propsData: {
size: 20
}
});
expect(wrapper).toMatchSnapshot();
});