[new feature] add sticky component (#3888)

This commit is contained in:
neverland
2019-07-18 17:48:18 +08:00
committed by GitHub
parent e1021e70ba
commit b273c89b3a
23 changed files with 651 additions and 124 deletions
@@ -0,0 +1,53 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`container prop 1`] = `
<div style="height: 20px;">
<div style="height: 10px;">
<div class="van-sticky van-sticky--fixed" style="transform: translate3d(0, -5px, 0);">
Content
</div>
</div>
</div>
`;
exports[`container prop 2`] = `
<div style="height: 20px;">
<div style="height: 10px;">
<div class="van-sticky" style="">
Content
</div>
</div>
</div>
`;
exports[`offset-top prop 1`] = `
<div style="height: 10px;">
<div class="van-sticky van-sticky--fixed" style="top: 10px;">
Content
</div>
</div>
`;
exports[`sticky to top 1`] = `
<div style="height: 10px;">
<div class="van-sticky">
Content
</div>
</div>
`;
exports[`sticky to top 2`] = `
<div style="height: 10px;">
<div class="van-sticky van-sticky--fixed">
Content
</div>
</div>
`;
exports[`z-index prop 1`] = `
<div style="height: 10px;">
<div class="van-sticky van-sticky--fixed" style="z-index: 0;">
Content
</div>
</div>
`;