mirror of
https://github.com/elisiariocouto/leggen.git
synced 2025-12-25 20:39:30 +00:00
feat(frontend): Add balance visibility toggle with blur effect
Co-authored-by: elisiariocouto <818914+elisiariocouto@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
import { Card, CardContent } from "../ui/card";
|
||||
import { BlurredValue } from "../ui/blurred-value";
|
||||
import { cn } from "../../lib/utils";
|
||||
|
||||
interface StatCardProps {
|
||||
@@ -13,6 +14,7 @@ interface StatCardProps {
|
||||
};
|
||||
className?: string;
|
||||
iconColor?: "green" | "blue" | "red" | "purple" | "orange" | "default";
|
||||
shouldBlur?: boolean;
|
||||
}
|
||||
|
||||
export default function StatCard({
|
||||
@@ -23,6 +25,7 @@ export default function StatCard({
|
||||
trend,
|
||||
className,
|
||||
iconColor = "default",
|
||||
shouldBlur = false,
|
||||
}: StatCardProps) {
|
||||
return (
|
||||
<Card className={cn(className)}>
|
||||
@@ -31,7 +34,9 @@ export default function StatCard({
|
||||
<div>
|
||||
<p className="text-sm font-medium text-muted-foreground">{title}</p>
|
||||
<div className="flex items-baseline">
|
||||
<p className="text-2xl font-bold text-foreground">{value}</p>
|
||||
<p className="text-2xl font-bold text-foreground">
|
||||
{shouldBlur ? <BlurredValue>{value}</BlurredValue> : value}
|
||||
</p>
|
||||
{trend && (
|
||||
<div
|
||||
className={cn(
|
||||
|
||||
Reference in New Issue
Block a user