forked from themesberg/flowbite-svelte
-
-
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.
feat: href for carousel (themesberg#1047)
* feat: href for carousel * fix: better link
- Loading branch information
Showing
3 changed files
with
40 additions
and
5 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
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,14 @@ | ||
<script lang="ts"> | ||
import { quintOut } from 'svelte/easing'; | ||
import type { HTMLImgAttributes } from 'svelte/elements'; | ||
import { fade, type TransitionConfig } from 'svelte/transition'; | ||
type TransitionFunc = (node: HTMLElement, params: any) => TransitionConfig; | ||
export let image: HTMLImgAttributes; | ||
export let transition: TransitionFunc = (x) => fade(x, { duration: 700, easing: quintOut }); | ||
</script> | ||
|
||
{#key image} | ||
<img alt="..." {...image} transition:transition={{}} class="absolute block w-full -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2 object-cover" /> | ||
{/key} |
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