-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(carousel): first auto play should be triggered in mount instead o…
…f in intro end event
- Loading branch information
1 parent
49db0f0
commit b23656d
Showing
4 changed files
with
67 additions
and
14 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@casual-ui/svelte': patch | ||
--- | ||
|
||
fix(carousel): first auto play should be triggered in mount instead of in intro end event |
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,40 @@ | ||
<script lang="ts"> | ||
import { CCarousel, CCarouselSlider } from '@casual-ui/svelte' | ||
let activeIndex = 0 | ||
</script> | ||
|
||
<CCarousel bind:activeIndex interval={5000} infinity arrowTiming="hover"> | ||
<CCarouselSlider> | ||
<div class="item"> | ||
<div class="icon i-openmoji-red-apple" /> | ||
Do you want some apples? | ||
</div> | ||
</CCarouselSlider> | ||
<CCarouselSlider> | ||
<div class="item"> | ||
<div class="icon i-openmoji-banana" /> | ||
Would you like some bananas? | ||
</div> | ||
</CCarouselSlider> | ||
<CCarouselSlider> | ||
<div class="item"> | ||
<div class="icon i-openmoji-grapes" /> | ||
How about some grapes? | ||
</div> | ||
</CCarouselSlider> | ||
</CCarousel> | ||
|
||
<style> | ||
.item { | ||
font-size: 32px; | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
} | ||
.item .icon { | ||
font-size: 100px; | ||
} | ||
</style> |
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