refactored LatestItems to component

This commit is contained in:
2026-04-24 14:01:49 +05:30
parent 175ca64d1f
commit b1509fd5ab
5 changed files with 29 additions and 6 deletions

View File

@@ -0,0 +1,18 @@
import * as React from "react";
export interface LatestItem {
id: string | number;
icon: React.ReactNode;
iconBgColor?: string;
title: string;
subtitle: string;
amount: string;
timeAgo: string;
}
export interface LatestItemsListProps {
title?: string;
items: LatestItem[];
onViewAll?: () => void;
accentColor: string;
}

View File

@@ -27,7 +27,7 @@ export interface LatestItemsListProps {
accentColor: any;
}
export default function LatestItemsList({
export default function LatestItems({
title = "Recent Transactions",
items,
onViewAll,

View File

@@ -0,0 +1,6 @@
import LatestItemsListView from "./LatestItems.view";
import { LatestItemsListProps } from "./LatestItems.models";
export default function LatestItemsList(props: LatestItemsListProps) {
return <LatestItemsListView {...props} />;
}

View File

@@ -0,0 +1,2 @@
export { default } from "./LatestItems";
export * from "./LatestItems.models";