fix.모션 수정

This commit is contained in:
clkim
2026-01-26 11:19:36 +09:00
parent ac235118ea
commit 4cd42d017c
9 changed files with 207 additions and 110 deletions

View File

@@ -21,7 +21,6 @@ const componentTag = computed((): string => {
return 'button'
}
})
const componentProps = computed(() => {
switch (props.type) {
case 'link':
@@ -34,7 +33,9 @@ const componentProps = computed(() => {
<template>
<component :is="componentTag" v-bind="componentProps" class="btn-circle">
<slot />
<span class="icon">
<slot />
</span>
<span class="sr-only">{{ props.srOnly }}</span>
</component>
</template>
@@ -51,4 +52,8 @@ const componentProps = computed(() => {
.btn-circle:deep(svg) {
@apply w-[20px] h-[20px] md:w-[24px] md:h-[24px];
}
.icon {
@apply transition-transform duration-300 ease-spring;
}
</style>

View File

@@ -22,7 +22,9 @@ const handlePlayClick = () => {
:style="{ backgroundColor: props.bgColor }"
@click="handlePlayClick"
>
<AtomsIconsArrowRightFill />
<span class="icon">
<AtomsIconsArrowRightFill />
</span>
<span class="sr-only">Play</span>
</button>
</template>
@@ -34,4 +36,10 @@ const handlePlayClick = () => {
after:content-[''] after:absolute after:top-0 after:left-0 after:w-full after:h-full after:bg-white after:rounded-[50%] after:opacity-0 after:transition-opacity after:duration-300 after:ease-in-out
hover:after:opacity-10;
}
.btn-play:hover .icon {
@apply scale-[1.08];
}
.icon {
@apply transition-transform duration-300 ease-spring;
}
</style>

View File

@@ -29,7 +29,7 @@ const componentTag = computed((): string => {
case 'download':
return props.href ? 'a' : 'button'
case 'internal':
return 'AtomsLocaleLink'
return props.href ? 'AtomsLocaleLink' : 'button'
default:
return 'button'
}
@@ -49,9 +49,12 @@ const componentProps = computed(() => {
}
if (props.type === 'internal') {
return {
to: props.href,
if (props.href) {
return {
to: props.href,
}
}
return {}
}
if (props.type === 'download') {
@@ -87,17 +90,17 @@ const componentProps = computed(() => {
<AtomsIconsLongArrowRightLine
v-if="props.type === 'internal'"
:color="props.textColor"
class="icon"
class="icon icon-internal"
/>
<AtomsIconsWebLinkLine
v-if="props.type === 'external'"
:color="props.textColor"
class="icon"
class="icon icon-external"
/>
<AtomsIconsDownloadLine
v-if="props.type === 'download'"
:color="props.textColor"
class="icon"
class="icon icon-download"
/>
</span>
</component>
@@ -121,6 +124,18 @@ const componentProps = computed(() => {
@apply before:border-[rgba(0,0,0,0.1)]
hover:before:border-[#999];
}
.icon {
@apply transition-transform duration-300 ease-spring;
}
.btn-base:hover .icon-internal {
@apply translate-x-[3px];
}
.btn-base:hover .icon-external {
@apply scale-[1.08];
}
.btn-base:hover .icon-download {
@apply translate-y-[3px];
}
.btn-base.disabled .btn-content {
@apply opacity-50;