UNPKG

ze-react-component-library

Version:
35 lines (34 loc) 920 B
import type { LogicformAPIResultType, LogicformType, PropertyType } from "zeroetp-api-sdk"; declare type YoyMomType = { value?: number; trend?: "up" | "down"; thisPeriod?: number; lastPeriod?: number; }; declare function useYoyMom({ data, showYoyAndMom, upColor, downColor, }: { data?: LogicformAPIResultType; showYoyAndMom?: boolean; upColor?: string; downColor?: string; }): { timestampProperty: PropertyType; shouldSplitByYear: boolean; lyLF: LogicformType; lyTip: string; lmTip: string; lmLF: LogicformType; yoyData: LogicformAPIResultType; momData: LogicformAPIResultType; getYoyMom: (_property?: PropertyType, index?: number) => { yoy?: YoyMomType; mom?: YoyMomType; yoyLF?: any; momLF?: any; }; hideMom: boolean; colors: { up: string; down: string; }; }; export default useYoyMom;