Skip to content

Commit

Permalink
feat: added plural table component (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
camarm-dev committed Nov 24, 2024
1 parent ac49ec3 commit 3698a05
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions app/src/components/PluralsTable.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<script setup lang="ts">
import {IonItem, IonLabel, IonList} from "@ionic/vue"
</script>

<template>
<ion-list inset class="border-radius border">
<ion-item color="light" lines="full">
<ion-label slot="start" v-if="plurals.some(plural => plural.label != '')">
<p>{{ $t('definition.form') }}</p>
</ion-label>
<ion-label slot="start">
<p>{{ $t('definition.singular') }}</p>
</ion-label>
<ion-label slot="end">
<p>{{ $t('definition.plural') }}</p>
</ion-label>
</ion-item>
<ion-item lines="full" v-for="plural in plurals">
<ion-label slot="start" v-if="plurals.some(plural => plural.label != '')">
<p v-html="plural.label"/>
</ion-label>
<ion-label slot="start">
<p v-html="plural.singular"/>
</ion-label>
<ion-label slot="end">
<p v-html="plural.plural"/>
</ion-label>
</ion-item>
</ion-list>
</template>

<script lang="ts">
import {PropType} from "vue"
import {RemedeWordDocument} from "@/functions/types/remede";
export default {
props: {
plurals: {
type: Object as PropType<RemedeWordDocument["plurals"]>,
required: true
}
}
}
</script>

0 comments on commit 3698a05

Please sign in to comment.