- Refactored select component to align with shadcn design principles. - Updated server status indicator component for consistency with shadcn style. - Modified spinner component to follow shadcn design guidelines. - Enhanced stat card component with shadcn-inspired styles. - Adjusted tab panel component to reflect shadcn design updates. - Revamped table row and table data cell components to match shadcn aesthetics. - Updated table header cell component for improved styling consistency. - Refined table component to align with shadcn design principles. - Enhanced tabs component with shadcn-inspired styles. - Updated toggle component to follow shadcn design guidelines. - Refactored tooltip component to align with shadcn design principles. - Updated server card component to reflect shadcn-inspired design.
51 lines
1.6 KiB
PHP
51 lines
1.6 KiB
PHP
{{--
|
|
Info Row / Key-Value Pair Component - shadcn-style
|
|
|
|
Usage:
|
|
<x-proxmox::ui.info-row label="IP Address" value="192.168.1.1" />
|
|
<x-proxmox::ui.info-row label="Status" :copyable="true">
|
|
<x-proxmox::ui.badge variant="success">Active</x-proxmox::ui.badge>
|
|
</x-proxmox::ui.info-row>
|
|
--}}
|
|
|
|
@props([
|
|
'label',
|
|
'value' => null,
|
|
'copyable' => false,
|
|
'icon' => null,
|
|
'muted' => false,
|
|
])
|
|
|
|
<div {{ $attributes->class(['flex items-center justify-between py-2 border-b last:border-b-0']) }}>
|
|
<div class="flex items-center gap-2 text-sm text-muted-foreground">
|
|
@if($icon)
|
|
<x-dynamic-component :component="$icon" class="size-4" />
|
|
@endif
|
|
<span>{{ $label }}</span>
|
|
</div>
|
|
<div class="flex items-center gap-2">
|
|
<span @class([
|
|
'text-sm font-medium',
|
|
'text-muted-foreground' => $muted,
|
|
])>
|
|
{{ $value ?? $slot }}
|
|
</span>
|
|
@if($copyable && $value)
|
|
<button
|
|
type="button"
|
|
x-data="{ copied: false }"
|
|
@click="
|
|
navigator.clipboard.writeText('{{ $value }}');
|
|
copied = true;
|
|
setTimeout(() => copied = false, 2000);
|
|
"
|
|
class="rounded-sm p-1 text-muted-foreground hover:text-foreground transition-colors duration-150"
|
|
title="Copy to clipboard"
|
|
>
|
|
<x-ri-file-copy-line x-show="!copied" class="size-4" />
|
|
<x-ri-check-line x-show="copied" x-cloak class="size-4 text-success" />
|
|
</button>
|
|
@endif
|
|
</div>
|
|
</div>
|