Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

696 B
Raw Blame
<script setup lang="ts">
import { computed } from 'vue';

import { labelTextColor } from '@/lib/labelColor';
import type { PostCardLabel } from '@/types/publish';

const props = defineProps<{
    label: PostCardLabel;
}>();

/** The label's own color as the background, with the text color that reads on it. */
const colors = computed(() => ({
    backgroundColor: props.label.color,
    color: labelTextColor(props.label.color),
}));
</script>

<template>
    <span
        class="inline-flex h-6 max-w-full min-w-0 items-center rounded-full px-2.5 text-xs font-medium text-foreground"
        :style="colors"
    >
        <span class="truncate">{{ label.name }}</span>
    </span>
</template>