"use client"; import { Box, Flex, Text, Tooltip, VisuallyHidden } from "@mantine/core"; import { useElementSize } from "@mantine/hooks"; import { useRequiredBoard } from "@homarr/boards/context"; import type { TablerIcon } from "@homarr/ui"; export interface SpeedStatCardProps { icon: TablerIcon; color: string; value: string; label: string; compact?: boolean; } export function SpeedStatCard({ icon: Icon, color, value, label, compact = false }: SpeedStatCardProps) { const { ref, height, width } = useElementSize(); const board = useRequiredBoard(); const isWide = width > height + 20; const hideLabel = height > 0 && height <= 38; return ( {value} {!hideLabel && ( {label} )} {hideLabel && {label}} ); }