fix. [SWV-866] 액션버튼 기능 개선 (이미지 타입 추가)

Made-with: Cursor
This commit is contained in:
clkim
2026-02-27 15:15:59 +09:00
parent 9208aae87f
commit fd83d3ae94
25 changed files with 308 additions and 143 deletions

View File

@@ -1,32 +1,45 @@
<script setup lang="ts">
interface props {
<<<<<<< HEAD
type?: 'button' | 'link'
to?: string
target?: '_self' | '_blank'
=======
type?: 'internal' | 'external' | 'action'
href?: string
>>>>>>> feature/20250228_SWV-866
backgroundColor?: string
srOnly?: string
}
const props = withDefaults(defineProps<props>(), {
<<<<<<< HEAD
type: 'button',
to: '',
target: '_self',
=======
type: 'action',
>>>>>>> feature/20250228_SWV-866
backgroundColor: '',
srOnly: '',
})
const componentTag = computed((): string => {
switch (props.type) {
case 'link':
case 'internal':
return 'AtomsLocaleLink'
case 'external':
return 'a'
default:
return 'button'
}
})
const componentProps = computed(() => {
switch (props.type) {
case 'link':
return { to: props.to, target: props.target }
case 'internal':
return { to: props.href, target: '_self' }
case 'external':
return { href: props.href, target: '_blank' }
default:
return {}
}