OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
27
app/Views/Templates/components/badge.blade.php
Normal file
27
app/Views/Templates/components/badge.blade.php
Normal file
@@ -0,0 +1,27 @@
|
||||
@props([
|
||||
'asLink' => false,
|
||||
'color' => match ($color ?? null) {
|
||||
'yellow' => ['tw-yellow-500', 'tw-bg-yellow-500'],
|
||||
'red' => ['tw-red-500', 'tw-bg-red-500'],
|
||||
'blue' => ['tw-blue-500', 'tw-bg-blue-500'],
|
||||
'green' => ['tw-green', 'tw-bg-green'],
|
||||
'primary' => ['tw-primary', 'tw-bg-primary'],
|
||||
'gray' => ['tw-gray-500', 'tw-bg-gray-500'],
|
||||
default => ['tw-gray-500', 'tw-bg-gray-500'],
|
||||
},
|
||||
])
|
||||
|
||||
@if ($asLink)
|
||||
<a
|
||||
@else
|
||||
<span
|
||||
@endif
|
||||
{{ $attributes->merge([
|
||||
'class' => 'tw-px-2.5 tw-py-0.5 tw-rounded ' . ($asLink ? 'text-white ' . $color[1] : $color[0] . ' tw-bg-gray-300'),
|
||||
] + ($asLink ? ['href' => $url ?? '#'] : [])) }}>
|
||||
{{ $slot }}
|
||||
@if ($asLink)
|
||||
</a>
|
||||
@else
|
||||
</span>
|
||||
@endif
|
||||
Reference in New Issue
Block a user