feat(SubmitBar): add button-color prop (#6757)

This commit is contained in:
neverland
2020-07-11 10:18:30 +08:00
committed by GitHub
parent 16e9829173
commit f1e9ca182e
5 changed files with 24 additions and 0 deletions
@@ -1,5 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`button-color prop 1`] = `
<div class="van-submit-bar">
<div class="van-submit-bar__bar"><button class="van-button van-button--danger van-button--normal van-button--round van-submit-bar__button van-submit-bar__button--danger" style="color: rgb(255, 255, 255); background: red; border-color: red;">
<div class="van-button__content"></div>
</button></div>
</div>
`;
exports[`decimal-length prop 1`] = `
<div class="van-submit-bar">
<div class="van-submit-bar__bar">
+11
View File
@@ -108,3 +108,14 @@ test('disable safe-area-inset-bottom prop', () => {
});
expect(wrapper).toMatchSnapshot();
});
test('button-color prop', () => {
const wrapper = mount(SubmitBar, {
context: {
props: {
buttonColor: 'red',
},
},
});
expect(wrapper).toMatchSnapshot();
});