Files
716d43a9a8 Nuxt 3 migration (#4342)
Update the nuxt3 version.

Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
Co-authored-by: Bram Wiepjes <bramw@protonmail.com>
Co-authored-by: Cezary <cezary@baserow.io>
Co-authored-by: Tsering Paljor <tsering@baserow.io>
Co-authored-by: Przemyslaw Kukulski <przemyslaw+gh@baserow.io>
Co-authored-by: Bram <bram2w@users.noreply.github.com>
2026-01-22 10:27:19 +01:00

44 lines
1.0 KiB
Vue

<template>
<div class="device-selector" data-highlight="builder-devices">
<div
v-for="(deviceType, index) in deviceTypes"
:key="index"
class="device-selector__item"
:class="`device-selector__item--${direction}`"
>
<RadioButton
:key="deviceType.getType()"
:value="deviceType.getType()"
:icon="deviceType.iconClass"
:model-value="deviceTypeSelected"
class="device-selector__button"
@click="$emit('selected', deviceType.getType())"
></RadioButton>
<slot name="deviceTypeControl" :device-type="deviceType"></slot>
</div>
</div>
</template>
<script>
export default {
name: 'DeviceSelector',
props: {
deviceTypeSelected: {
type: String,
required: true,
},
direction: {
type: String,
required: false,
default: 'column',
},
},
emits: ['selected'],
computed: {
deviceTypes() {
return Object.values(this.$registry.getOrderedList('device'))
},
},
}
</script>