Files
web-temp/layers/components/widgets/Button.vue

32 lines
809 B
Vue

<script setup lang="ts">
import { getResourcesData } from '#layers/utils/dataUtil'
import type { PageDataComponent } from '#layers/types/api/pageData'
const props = defineProps<{
componentData: PageDataComponent
groupSets?: boolean
}>()
const resourcesData = computed(() => {
return getResourcesData({
resources: props.componentData?.resources,
isMultiple: true,
groupSets: props.groupSets,
})
})
</script>
<template>
<template v-if="resourcesData">
<AtomsButton
v-for="button in resourcesData"
:key="button.group_label"
:background-color="button.btn_info?.color_code_btn"
:text-color="button.btn_info?.color_code_txt"
:disabled="button.btn_info?.disabled"
>
{{ button.btn_info?.txt_btn_name }}
</AtomsButton>
</template>
</template>