feat(Overlay): add custom-style prop (#4572)
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
exports[`class-name prop 1`] = `<div class="van-overlay my-overlay" style="z-index: 1;" name="van-fade"></div>`;
|
||||
|
||||
exports[`custom style prop 1`] = `<div class="van-overlay" style="z-index: 1; background-color: red;" name="van-fade"></div>`;
|
||||
|
||||
exports[`default slot 1`] = `<div class="van-overlay" style="z-index: 1; display: none;" name="van-fade">Custom Default</div>`;
|
||||
|
||||
exports[`duration prop 1`] = `<div class="van-overlay" style="z-index: 1; animation-duration: 1s;" name="van-fade"></div>`;
|
||||
|
||||
@@ -23,6 +23,19 @@ test('class-name prop', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('custom style prop', () => {
|
||||
const wrapper = mount(Overlay, {
|
||||
propsData: {
|
||||
show: true,
|
||||
customStyle: {
|
||||
backgroundColor: 'red'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('duration prop', () => {
|
||||
const wrapper = mount(Overlay, {
|
||||
propsData: {
|
||||
|
||||
Reference in New Issue
Block a user