UNPKG

@arolariu/components

Version:

🎨 70+ 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! ⚡

41 lines • 2.29 kB
import * as React from "react"; import * as RechartsPrimitive from "recharts"; import type { NameType, ValueType } from "recharts/types/component/DefaultTooltipContent"; declare const THEMES: { readonly light: ""; readonly dark: ".dark"; }; export type ChartConfig = Record<string, { label?: React.ReactNode; icon?: React.ComponentType; } & ({ color?: string; theme?: never; } | { color?: never; theme: Record<keyof typeof THEMES, string>; })>; interface ChartContainerProps extends Omit<React.ComponentProps<"div">, "children">, Pick<React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>, "initialDimension" | "aspect" | "debounce" | "minHeight" | "minWidth" | "maxHeight" | "height" | "width" | "onResize" | "children"> { config: ChartConfig; innerResponsiveContainerStyle?: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["style"]; } declare function ChartContainer({ id, config, initialDimension, className, children, ...props }: Readonly<ChartContainerProps>): import("react/jsx-runtime").JSX.Element; declare const ChartStyle: ({ id, config }: { id: string; config: ChartConfig; }) => import("react/jsx-runtime").JSX.Element; declare const ChartTooltip: typeof RechartsPrimitive.Tooltip; declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<"div"> & { hideLabel?: boolean; hideIndicator?: boolean; indicator?: "line" | "dot" | "dashed"; nameKey?: string; labelKey?: string; } & Omit<RechartsPrimitive.DefaultTooltipContentProps<ValueType, NameType>, "accessibilityLayer">): import("react/jsx-runtime").JSX.Element; declare const ChartLegend: typeof RechartsPrimitive.Legend; declare function ChartLegendContent({ className, hideIcon, nameKey, payload, verticalAlign, }: React.ComponentProps<"div"> & { hideIcon?: boolean; nameKey?: string; } & RechartsPrimitive.DefaultLegendContentProps): import("react/jsx-runtime").JSX.Element; export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent }; //# sourceMappingURL=chart.d.ts.map