Unified card backgrounds, borders, and shadows across components for a more consistent look. Enhanced table, tab, and button styles for clarity and accessibility. Improved layout and modal structure in OneBot API debug, added modal for struct display, and optimized WebSocket debug connection logic. Updated file manager, logs, network, and terminal pages for visual consistency. Refactored interface definitions for stricter typing and readability.
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import { Card, CardBody } from '@heroui/card';
|
|
import clsx from 'clsx';
|
|
|
|
|
|
|
|
export interface NetworkItemDisplayProps {
|
|
count: number;
|
|
label: string;
|
|
size?: 'sm' | 'md';
|
|
}
|
|
|
|
const NetworkItemDisplay: React.FC<NetworkItemDisplayProps> = ({
|
|
count,
|
|
label,
|
|
size = 'md',
|
|
}) => {
|
|
return (
|
|
<Card
|
|
className={clsx(
|
|
'bg-white/60 dark:bg-black/40 backdrop-blur-xl border border-white/40 dark:border-white/10 shadow-sm transition-all hover:bg-white/70 dark:hover:bg-black/30',
|
|
size === 'md'
|
|
? 'col-span-8 md:col-span-2'
|
|
: 'col-span-2 md:col-span-1'
|
|
)}
|
|
shadow='none'
|
|
>
|
|
<CardBody className='items-center md:gap-1 p-1 md:p-2'>
|
|
<div
|
|
className={clsx(
|
|
'flex-1 font-mono font-bold text-default-700 dark:text-gray-200',
|
|
size === 'md' ? 'text-4xl md:text-5xl' : 'text-2xl md:text-3xl',
|
|
)}
|
|
>
|
|
{count}
|
|
</div>
|
|
<div
|
|
className={clsx(
|
|
'whitespace-nowrap text-nowrap flex-shrink-0 font-medium text-default-500',
|
|
size === 'md' ? 'text-sm' : 'text-xs',
|
|
)}
|
|
>
|
|
{label}
|
|
</div>
|
|
</CardBody>
|
|
</Card>
|
|
);
|
|
};
|
|
|
|
export default NetworkItemDisplay;
|