mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 19:01:47 +00:00
refactor(core): move app para src e padroniza estrutura
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { WidgetEmptyState } from "@/shared/components/widget-empty-state";
|
||||
import {
|
||||
PaymentBreakdownListItem,
|
||||
type PaymentBreakdownListItemData,
|
||||
} from "./payment-breakdown-list-item";
|
||||
|
||||
export type { PaymentBreakdownListItemData } from "./payment-breakdown-list-item";
|
||||
|
||||
type PaymentBreakdownListProps = {
|
||||
items: PaymentBreakdownListItemData[];
|
||||
emptyIcon: ReactNode;
|
||||
emptyTitle: string;
|
||||
emptyDescription: string;
|
||||
};
|
||||
|
||||
export function PaymentBreakdownList({
|
||||
items,
|
||||
emptyIcon,
|
||||
emptyTitle,
|
||||
emptyDescription,
|
||||
}: PaymentBreakdownListProps) {
|
||||
if (items.length === 0) {
|
||||
return (
|
||||
<WidgetEmptyState
|
||||
icon={emptyIcon}
|
||||
title={emptyTitle}
|
||||
description={emptyDescription}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-4 px-0">
|
||||
<ul className="flex flex-col gap-2">
|
||||
{items.map((item) => (
|
||||
<PaymentBreakdownListItem key={item.id} item={item} />
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user