-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adjusted design and animation for 'mint now' button
- Loading branch information
Showing
5 changed files
with
83 additions
and
10 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
packages/taikoon-ui/src/components/AnimatedArrow/AnimatedArrow.svelte
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,45 @@ | ||
<script lang="ts"> | ||
import { Icons } from '$components/core/Icons'; | ||
import { classNames } from '$lib/util/classNames'; | ||
export let isHovered = false; | ||
const ArrowIcon = Icons.ArrowRightFilled; | ||
const wrapperClasses = classNames( | ||
'bg-primary-content', | ||
'rounded-full', | ||
'w-[32px]', | ||
'h-[32px]', | ||
'flex', | ||
'items-center', | ||
'justify-center', | ||
'overflow-hidden', | ||
); | ||
$: arrowsWrapper = classNames( | ||
'w-full', | ||
'h-full', | ||
'relative', | ||
'flex', | ||
'items-center', | ||
'justify-center', | ||
'transition', | ||
'transform', | ||
isHovered ? 'translate-x-[100%]' : null, | ||
'ease-in-out', | ||
'duration-300', | ||
); | ||
const arrowClasses = classNames('absolute'); | ||
const leftArrowClasses = classNames(arrowClasses, 'left-[-100%]'); | ||
const rightArrowClasses = classNames(arrowClasses); | ||
</script> | ||
|
||
<div class={wrapperClasses}> | ||
<div class={arrowsWrapper}> | ||
<ArrowIcon size="32" class={leftArrowClasses} /> | ||
<ArrowIcon size="32" class={rightArrowClasses} /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as AnimatedArrow } from './AnimatedArrow.svelte'; |
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