Skip to content
Snippets Groups Projects
EntitiesList.vue 740 B
Newer Older
malyusgun's avatar
malyusgun committed
<script setup lang="ts">
import type { IEntity } from '@/app/interfaces/environment';

interface Props {
  entities: IEntity[];
malyusgun's avatar
malyusgun committed
}
defineProps<Props>();
const emit = defineEmits(['createEntity']);

const createEntity = (entity: IEntity) => {
  emit('createEntity', entity);
};
</script>

<template>
  <EntityItem
    v-for="entitiesItem of entities"
    :key="entitiesItem.entity_uuid"
    :entity="entitiesItem"
    :isEditMode="isEditMode"
malyusgun's avatar
malyusgun committed
  />
  <div class="my-4" style="margin-left: 64px">
    <Transition name="bounce">
      <CreateEntityMenu v-if="isEditMode" @createEntity="createEntity" />
    </Transition>
    <div v-if="!isEditMode" style="height: 55px"></div>
malyusgun's avatar
malyusgun committed
  </div>
</template>

<style scoped></style>