-
-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(swipe): support navigation prop and prev and next slots (#1177)
- Loading branch information
1 parent
0fbcce8
commit d717f0c
Showing
12 changed files
with
312 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
packages/varlet-ui/src/swipe/__tests__/__snapshots__/index.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`test swipe component props > test swipe navigation 1`] = ` | ||
"<div class=\\"var-swipe\\" style=\\"width: 100px; height: 100px;\\"> | ||
<div class=\\"var-swipe__track\\" style=\\"width: 0px; transform: translateX(0px); transition-duration: 300ms;\\"> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">1</div> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">2</div> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">3</div> | ||
</div> | ||
<!--v-if--> | ||
<!--v-if--> | ||
<!--v-if--> | ||
</div>" | ||
`; | ||
exports[`test swipe component props > test swipe navigation 2`] = ` | ||
"<div class=\\"var-swipe\\" style=\\"width: 100px; height: 100px;\\"> | ||
<div class=\\"var-swipe__track\\" style=\\"width: 0px; transform: translateX(0px); transition-duration: 300ms;\\"> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">1</div> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">2</div> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">3</div> | ||
</div> | ||
<transition-stub name=\\"var-swipe--navigation-prev-transition\\" appear=\\"false\\" persisted=\\"false\\" css=\\"true\\"> | ||
<div class=\\"var-swipe__navigation var-swipe__navigation-prev\\"><button class=\\"var-button var--box var-button--normal var--inline-flex var-button--default var-elevation--2 var-swipe__navigation-prev-button\\" type=\\"button\\" var-swipe-cover=\\"\\"> | ||
<!--v-if--> | ||
<div class=\\"var-button__content\\"> | ||
<var-icon var-swipe-cover=\\"\\" class=\\"var-swipe__navigation-prev-button-icon\\" name=\\"chevron-left\\"></var-icon> | ||
</div> | ||
<div class=\\"var-hover-overlay\\"></div> | ||
</button></div> | ||
</transition-stub> | ||
<transition-stub name=\\"var-swipe--navigation-next-transition\\" appear=\\"false\\" persisted=\\"false\\" css=\\"true\\"> | ||
<div class=\\"var-swipe__navigation var-swipe__navigation-next\\"><button class=\\"var-button var--box var-button--normal var--inline-flex var-button--default var-elevation--2 var-swipe__navigation-next-button\\" type=\\"button\\" var-swipe-cover=\\"\\"> | ||
<!--v-if--> | ||
<div class=\\"var-button__content\\"> | ||
<var-icon var-swipe-cover=\\"\\" class=\\"var-swipe__navigation-next-button-icon\\" name=\\"chevron-right\\"></var-icon> | ||
</div> | ||
<div class=\\"var-hover-overlay\\"></div> | ||
</button></div> | ||
</transition-stub> | ||
<div class=\\"var-swipe__indicators\\"> | ||
<div class=\\"var-swipe__indicator var-swipe--indicator-active\\"></div> | ||
<div class=\\"var-swipe__indicator\\"></div> | ||
<div class=\\"var-swipe__indicator\\"></div> | ||
</div> | ||
</div>" | ||
`; | ||
exports[`test swipe component props > test swipe navigation 3`] = ` | ||
"<div class=\\"var-swipe\\" style=\\"width: 100px; height: 100px;\\"> | ||
<div class=\\"var-swipe__track\\" style=\\"width: 0px; transform: translateX(0px); transition-duration: 300ms;\\"> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">1</div> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">2</div> | ||
<div class=\\"var-swipe-item\\" style=\\"width: 0px; transform: translateX(0px);\\">3</div> | ||
</div> | ||
<transition-stub name=\\"var-swipe--navigation-prev-transition\\" appear=\\"false\\" persisted=\\"false\\" css=\\"true\\"> | ||
<!--v-if--> | ||
</transition-stub> | ||
<transition-stub name=\\"var-swipe--navigation-next-transition\\" appear=\\"false\\" persisted=\\"false\\" css=\\"true\\"> | ||
<!--v-if--> | ||
</transition-stub> | ||
<div class=\\"var-swipe__indicators\\"> | ||
<div class=\\"var-swipe__indicator var-swipe--indicator-active\\"></div> | ||
<div class=\\"var-swipe__indicator\\"></div> | ||
<div class=\\"var-swipe__indicator\\"></div> | ||
</div> | ||
</div>" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.