clusev/resources/views/components/badge.blade.php

11 lines
518 B
PHP

@props(['tone' => 'neutral'])
@php
$c = [
'neutral' => 'text-ink-2 border-line bg-line',
'accent' => 'text-accent-text border-accent/25 bg-accent/10',
'cyan' => 'text-cyan-bright border-cyan/20 bg-cyan/10',
'warning' => 'text-warning border-warning/25 bg-warning/10',
][$tone] ?? 'text-ink-2 border-line bg-line';
@endphp
<span {{ $attributes->merge(['class' => "inline-flex items-center gap-1 rounded-sm border px-2 py-0.5 font-mono text-[11px] $c"]) }}>{{ $slot }}</span>