Files
KAFM-Project/constants/types.ts

78 lines
1.5 KiB
TypeScript

import { LucideProps } from "lucide-react";
import { ComponentType } from "react";
import { colorMap } from "./constant";
// Types and interfaces used in login Page
export type Step = "login" | "verify" | "forgot";
export interface AuthLayoutProps {
children: React.ReactNode;
}
export interface Props {
onBack?: () => void;
onSuccess?: () => void;
onForgotPassword?:()=>void;
item?: any;
}
export interface FormProps {
label: string;
value?: string;
type?: string;
placeholder?:string
}
// Overview dashboard interface used
interface Activity {
time: string;
text: string;
boldText: string;
}
export interface ActivityFeedProps {
activities: Activity[];
}
export interface ChartItem {
month: string;
height: string;
}
export interface BarChartProps {
data: ChartItem[];
}
export interface StatCardProps {
// Common Fields
title: string;
value: string | number;
variant?: "progress" | "icon";
subtitle?: string;
progress?: number;
color?: keyof typeof colorMap;
icon?: ComponentType<LucideProps>;
badgeText?: string;
badgeClassName?: string;
iconContainerClassName?: string;
isActiveCard?: boolean;
}
export interface ProgressBarProps {
label: string;
value: number;
maxValue: number;
}
export interface StatusProgressProps {
label: string;
value: number;
total: number;
barColor?: string;
}
// For footer banner
export interface InfoBannerProps {
boldText?: string;
normalText?: string;
}