This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Zaimki/components/Flag.vue

30 lines
621 B
Vue
Raw Normal View History

<template>
2020-12-08 14:14:40 -08:00
<span :title="name">
<img :src="src" alt=""/>
2020-12-08 14:14:40 -08:00
{{ translatedName }}
</span>
</template>
<script>
export default {
props: {
name: { required: true },
src: { required: true },
2020-12-08 14:14:40 -08:00
pronoun: { required: true },
},
computed: {
translatedName() {
return this.pronoun.format(
this.$t(`flags.${this.name.replace(/ /g, '_')}`, {}, false) || this.name
);
},
},
}
</script>
<style lang="scss" scoped>
img {
height: 1rem;
}
</style>