Skip to content

Commit

Permalink
✨ Componentes cra 7
Browse files Browse the repository at this point in the history
  • Loading branch information
anattolia committed Aug 29, 2024
1 parent b6dd04c commit 1e31dca
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/componentes/Personaje.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script setup lang="ts">
import { defineProps } from 'vue';
import type { ElementoPaisaje } from '../tipos';
interface Props {
personaje: ElementoPaisaje;
// Definir qué tipo de dato va a ser la ubicación
ubicacion: any;
}
defineProps<Props>();
</script>

<template>
<h1>{{ personaje.nombre }}</h1>
<p>{{ personaje.descripcion }}</p>
<video :src="personaje.ruta"></video>
</template>

<style lang="scss" scoped></style>
19 changes: 19 additions & 0 deletions src/componentes/Podcast.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script setup lang="ts">
import { defineProps } from 'vue';
import type { ElementoPaisaje } from '../tipos';
interface Props {
podcast: ElementoPaisaje;
// Definir qué tipo de dato va a ser la ubicación
ubicacion: any;
}
defineProps<Props>();
</script>

<template>
<h1>{{ podcast.nombre }}</h1>
<p>{{ podcast.descripcion }}</p>
<audio :src="podcast.ruta"></audio>
</template>

<style lang="scss" scoped></style>
18 changes: 18 additions & 0 deletions src/componentes/Relato.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script setup lang="ts">
import { defineProps } from 'vue';
import type { ElementoPaisaje } from '../tipos';
interface Props {
relato: ElementoPaisaje;
// Definir qué tipo de dato va a ser la ubicación
ubicacion: any;
}
defineProps<Props>();
</script>

<template>
<h1>{{ relato.nombre }}</h1>
<p>{{ relato.descripcion }}</p>
</template>

<style lang="scss" scoped></style>
8 changes: 8 additions & 0 deletions src/tipos.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Los elementos son: podcast, personaje y texto
export interface ElementoPaisaje {
nombre: string;
descripcion: string;
// POR HACER: definir formato de ubicación
ubicacion: number;
ruta?: string;
}

0 comments on commit 1e31dca

Please sign in to comment.