funkwhale/front/src/components/ui/Pill.vue

23 wiersze
576 B
Vue
Czysty Zwykły widok Historia

<script setup lang="ts">
import { useColorOrPastel } from '~/composables/colors'
import type { ColorProps, PastelProps } from '~/types/common-props'
const props = defineProps<ColorProps | PastelProps>()
const color = useColorOrPastel(() => props.color, 'secondary')
</script>
<template>
<button class="funkwhale is-colored pill" :class="[color]">
<div v-if="!!$slots.image" class="pill-image">
<slot name="image" />
</div>
<div class="pill-content">
<slot />
</div>
</button>
</template>
<style lang="scss">
@import './style.scss';
</style>