mirror of
https://github.com/baserow/baserow.git
synced 2026-12-05 00:38:35 +00:00
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>
44 lines
1.0 KiB
Vue
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>
|