feat(Toast): add iconSize option (#8338)

This commit is contained in:
neverland
2021-03-14 11:44:43 +08:00
committed by GitHub
parent 6877dabe6a
commit 7a14991b16
6 changed files with 20 additions and 1 deletions
+13
View File
@@ -61,3 +61,16 @@ test('create a forbidClick toast', async () => {
document.body.classList.contains('van-toast--unclickable')
).toBeFalsy();
});
test('should change icon size when using icon-size prop', async () => {
const wrapper = mount(Toast, {
props: {
show: true,
icon: 'success',
iconSize: '10',
},
});
await later();
expect(wrapper.find('.van-icon').style.fontSize).toEqual('10px');
});