30 lines
693 B
Vue
30 lines
693 B
Vue
<script setup lang="ts">
|
|
import type { PageDataResourceGroup } from '#layers/types/api/pageData'
|
|
|
|
const props = defineProps<{
|
|
resourcesData: PageDataResourceGroup
|
|
}>()
|
|
|
|
const modalStore = useModalStore()
|
|
|
|
const bgColor = computed(() => {
|
|
return getColorCodeFromData(props.resourcesData.display, 'none')
|
|
})
|
|
|
|
// 비디오 플레이 버튼 클릭 핸들러
|
|
const handleVideoPlayClick = () => {
|
|
const youtubeUrl = props.resourcesData?.display?.text ?? ''
|
|
if (youtubeUrl) {
|
|
modalStore.handleOpenYoutube({ youtubeUrl })
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<AtomsButtonPlay
|
|
:bg-color="bgColor"
|
|
:tracking="props.resourcesData.tracking"
|
|
@click="handleVideoPlayClick"
|
|
/>
|
|
</template>
|