--- import { personById } from '@shared/lib/people' import type { SparklineType } from '@ui/Sparkline.astro' import Icon from '@ui/Icon.astro' import Avatar from '@ui/Avatar.astro' import Sparkline from '@ui/Sparkline.astro' interface Props { icon?: string color?: string lt?: boolean title?: string | number description?: string class?: string id?: string personId?: number /** chart drawn next to the number; `circle` shows chartData as a share of 100 */ chartType?: SparklineType chartPosition?: string chartData?: string | number smallIcon?: string descriptionValue?: string descriptionValueColor?: string } const { icon, color, lt, title, description, class: className, id, personId, chartType = 'line', chartPosition = 'right', chartData, smallIcon, descriptionValue, descriptionValueColor } = Astro.props const chartColor = color ?? 'primary' const avatarClass = [color ? (lt ? `bg-${color}-lt` : `bg-${color} text-${color}-fg`) : '', 'avatar', 'avatar-square'] ---
{ icon ? (
) : personId ? (
) : chartData && chartPosition === 'left' ? (
) : null }
{title ?? 1700} {smallIcon && } {descriptionValue && {descriptionValue}}
{description ?? 'Users'}
{ chartData && chartPosition === 'right' && (
) }