mirror of
https://github.com/gosticks/plane.git
synced 2025-10-16 12:45:33 +00:00
* 🚧 WIP: Introduced customTicks prop in BarChart for flexible tick rendering. * ✨ feat: added customTicks to axis charts for flexible tick rendering * 🔧 fix: update default bar fill color to black and ensure consistent color usage in BarChart * ✨ feat: add customTooltipContent prop to LineChart for enhanced tooltip flexibility * 🔧 fix: update bar fill color handling to support dynamic colors based on data and removed DEFAULT_BAR_FILL_COLOR * 🔧 fix: correct bar fill color handling in BarChart to ensure proper color assignment for tooltips * 🔧 fix: update customTicks prop types in TAxisChartProps to use unknown type for better type safety * 📝 chore: updated translations and cleaned up insight card * 🚨 fix: lint * 🔧 fix: remove unused translation key "no_of" from Russian translations
31 lines
799 B
TypeScript
31 lines
799 B
TypeScript
// plane package imports
|
|
import React from "react";
|
|
import { IAnalyticsResponseFields } from "@plane/types";
|
|
import { Loader } from "@plane/ui";
|
|
|
|
export type InsightCardProps = {
|
|
data?: IAnalyticsResponseFields;
|
|
label: string;
|
|
isLoading?: boolean;
|
|
};
|
|
|
|
const InsightCard = (props: InsightCardProps) => {
|
|
const { data, label, isLoading = false } = props;
|
|
const count = data?.count ?? 0;
|
|
|
|
return (
|
|
<div className="flex flex-col gap-3">
|
|
<div className="text-sm text-custom-text-300">{label}</div>
|
|
{!isLoading ? (
|
|
<div className="flex flex-col gap-1">
|
|
<div className="text-2xl font-bold text-custom-text-100">{count}</div>
|
|
</div>
|
|
) : (
|
|
<Loader.Item height="50px" width="100%" />
|
|
)}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default InsightCard;
|