mirror of
https://github.com/hanzoai/sign.git
synced 2026-11-02 08:37:02 +00:00
The product is branded Hanzo eSign (esign.hanzo.ai, repo hanzoai/esign). Rename all workspace packages @hanzo/sign-* → @hanzo/esign-* (1052 files) and align docker/Dockerfile turbo --scope/--filter to the actual remix package name @hanzo/esign (was a pre-existing mismatch with -remix that broke the build). Protected deps (@hanzo/insights, @hanzo/logo) untouched.
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import type { LucideIcon } from 'lucide-react/dist/lucide-react';
|
|
|
|
import { cn } from '@hanzo/esign-ui/lib/utils';
|
|
|
|
export type CardMetricProps = {
|
|
icon?: LucideIcon;
|
|
title: string;
|
|
value?: string | number;
|
|
className?: string;
|
|
children?: React.ReactNode;
|
|
};
|
|
|
|
export const CardMetric = ({ icon: Icon, title, value, className, children }: CardMetricProps) => {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'h-32 max-h-32 max-w-full overflow-hidden rounded-lg border border-border bg-background shadow shadow-transparent duration-200 hover:shadow-border/80',
|
|
className,
|
|
)}
|
|
>
|
|
<div className="flex h-full max-h-full flex-col px-4 pb-6 pt-4 sm:px-4 sm:pb-8 sm:pt-4">
|
|
<div className="flex items-start">
|
|
{Icon && (
|
|
<div className="mr-2 h-4 w-4">
|
|
<Icon className="h-4 w-4 text-muted-foreground" />
|
|
</div>
|
|
)}
|
|
|
|
<h3 className="text-primary-forground mb-2 flex items-end text-sm font-medium leading-tight">
|
|
{title}
|
|
</h3>
|
|
</div>
|
|
|
|
{children || (
|
|
<p className="mt-auto text-4xl font-semibold leading-8 text-foreground">
|
|
{typeof value === 'number' ? value.toLocaleString('en-US') : value}
|
|
</p>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|