mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
25 lines
510 B
Vue
25 lines
510 B
Vue
<script setup>
|
|
import { h, defineProps } from 'vue';
|
|
|
|
const props = defineProps({
|
|
country: { type: String, required: true },
|
|
squared: { type: Boolean, default: false },
|
|
});
|
|
|
|
const renderFlag = () => {
|
|
const classes = ['fi', `fi-${props.country.toLowerCase()}`, 'flex-shrink-0'];
|
|
if (props.squared) {
|
|
classes.push('fis');
|
|
}
|
|
return h('span', { class: classes });
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<component :is="renderFlag" />
|
|
</template>
|
|
|
|
<style>
|
|
@import 'flag-icons/css/flag-icons.min.css';
|
|
</style>
|