22 lines
542 B
Vue
22 lines
542 B
Vue
<script setup lang="ts">
|
|
import { useColorOrPastel, type ColorProps, type PastelProps } from '~/composables/colors'
|
|
|
|
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 './pill.scss';
|
|
</style>
|