common component props
This commit is contained in:
@@ -1,27 +1,19 @@
|
||||
import * as React from "react";
|
||||
import { ReportData, GroupKey } from "../../features/report";
|
||||
import { ComponentProps } from "../report.props";
|
||||
import { buildLatestItems } from "./LatestItems.adapter";
|
||||
import LatestItemsView from "./LatestItems.view";
|
||||
|
||||
type Props = {
|
||||
reportData: ReportData;
|
||||
flow: "outflows" | "inflows";
|
||||
header: string;
|
||||
selectedPeriodId: string | null;
|
||||
selectedGroupKey?: GroupKey | null;
|
||||
accentColor: string;
|
||||
isFetching?: boolean;
|
||||
};
|
||||
type Props = ComponentProps;
|
||||
|
||||
export default function LatestItems({
|
||||
reportData,
|
||||
flow,
|
||||
state,
|
||||
stateSetters,
|
||||
header,
|
||||
selectedPeriodId,
|
||||
selectedGroupKey = null,
|
||||
accentColor,
|
||||
accentColor = "",
|
||||
isFetching,
|
||||
}: Props) {
|
||||
const { flow, selectedPeriodId, selectedGroupKey } = state;
|
||||
const [visibleCount, setVisibleCount] = React.useState(5);
|
||||
|
||||
const allItems = React.useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user