feat(ActionBarIcon): add icon-prefix prop (#8748)
This commit is contained in:
@@ -51,3 +51,13 @@ exports[`should render icon slot with dot correctly 1`] = `
|
||||
Content
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`should render icon-prefix correctly 1`] = `
|
||||
<div role="button"
|
||||
class="van-action-bar-icon"
|
||||
tabindex="0"
|
||||
>
|
||||
<div class="van-badge__wrapper my-icon my-icon-success van-action-bar-icon__icon">
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -21,6 +21,17 @@ test('should render icon slot correctly', () => {
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('should render icon-prefix correctly', () => {
|
||||
const wrapper = mount(ActionBarIcon, {
|
||||
props: {
|
||||
icon: 'success',
|
||||
iconPrefix: 'my-icon',
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('should render icon slot with badge correctly', () => {
|
||||
const wrapper = mount(ActionBarIcon, {
|
||||
props: {
|
||||
|
||||
Reference in New Issue
Block a user