UNPKG

@arolariu/components

Version:

🎨 60+ beautiful, accessible React components built on Radix UI. TypeScript-first, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡

55 lines • 2.67 kB
import * as React from "react"; import * as RechartsPrimitive from "recharts"; import type { LegendPayload } from "recharts/types/component/DefaultLegendContent"; import { NameType, Payload, ValueType } from "recharts/types/component/DefaultTooltipContent"; import type { Props as LegendProps } from "recharts/types/component/Legend"; import { TooltipContentProps } from "recharts/types/component/Tooltip"; declare const THEMES: { readonly light: ""; readonly dark: ".dark"; }; export type ChartConfig = { [k in string]: { label?: React.ReactNode; icon?: React.ComponentType; } & ({ color?: string; theme?: never; } | { color?: never; theme: Record<keyof typeof THEMES, string>; }); }; declare function ChartContainer({ id, className, children, config, ...props }: React.ComponentProps<"div"> & { config: ChartConfig; children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"]; }): import("react/jsx-runtime").JSX.Element; declare const ChartStyle: ({ id, config }: { id: string; config: ChartConfig; }) => import("react/jsx-runtime").JSX.Element | null; declare const ChartTooltip: typeof RechartsPrimitive.Tooltip; type CustomTooltipProps = TooltipContentProps<ValueType, NameType> & { className?: string; hideLabel?: boolean; hideIndicator?: boolean; indicator?: "line" | "dot" | "dashed"; nameKey?: string; labelKey?: string; labelFormatter?: (label: TooltipContentProps<number, string>["label"], payload: TooltipContentProps<number, string>["payload"]) => React.ReactNode; formatter?: (value: number | string, name: string, item: Payload<number | string, string>, index: number, payload: ReadonlyArray<Payload<number | string, string>>) => React.ReactNode; labelClassName?: string; color?: string; }; declare function ChartTooltipContent({ active, payload, label, className, indicator, hideLabel, hideIndicator, labelFormatter, formatter, labelClassName, color, nameKey, labelKey, }: CustomTooltipProps): import("react/jsx-runtime").JSX.Element | null; declare const ChartLegend: typeof RechartsPrimitive.Legend; type ChartLegendContentProps = { className?: string; hideIcon?: boolean; verticalAlign?: LegendProps["verticalAlign"]; payload?: LegendPayload[]; nameKey?: string; }; declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: ChartLegendContentProps): import("react/jsx-runtime").JSX.Element | null; export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, }; //# sourceMappingURL=chart.d.ts.map