1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-21 23:37:55 +00:00
bramw_baserow/web-frontend/modules/builder/components/FontFamilySelector.vue
2024-10-14 08:47:26 +00:00

31 lines
618 B
Vue

<template>
<Dropdown :value="value" fixed-items @input="$emit('input', $event)">
<DropdownItem
v-for="fontFamily in fontFamilies"
:key="fontFamily.getType()"
:value="fontFamily.getType()"
:name="fontFamily.name"
/>
</Dropdown>
</template>
<script>
export default {
name: 'FontFamilySelector',
props: {
value: {
type: String,
required: false,
default: 'Inter',
},
},
computed: {
fontFamilies() {
return Object.values(this.$registry.getAll('fontFamily')).sort((a, b) =>
a.name.localeCompare(b.name)
)
},
},
}
</script>