@ssa-ui-kit/widgets
Version:
SSA UI Kit widgets
35 lines (34 loc) • 1.09 kB
TypeScript
import type { To } from 'react-router-dom';
import { MainColors, PieChartProps, Theme } from '@ssa-ui-kit/core';
interface WithTheme {
theme: Theme;
}
type BalanceBase = {
total: number | string;
currency: string;
legendColorPalette?: Array<keyof MainColors | string>;
chartColorPalette?: string[];
variant?: 'valueList' | 'withoutValueList';
fullscreenModeFeature?: boolean;
data: Array<{
id: string | number;
value: number;
label: string;
[key: string | number | symbol]: unknown;
}>;
};
export interface BalancePieChartProps extends WithTheme, BalanceBase {
pieChartProps?: Partial<PieChartProps>;
activeHighlight?: boolean;
onFullscreenModeChange?: (isFullscreenMode: boolean) => void;
}
export interface AccountBalanceProps extends BalanceBase {
title?: string;
className?: string;
onClick?: () => void;
link?: To;
activeHighlight?: boolean;
widgetMaxWidth?: string;
}
export type BalancePieChartTitleProps = Pick<BalancePieChartProps, 'total' | 'currency' | 'theme'>;
export {};