fixed incompatibility

This commit is contained in:
Daniel Ringel 2026-01-22 13:42:56 -05:00 committed by GitHub
parent aaa9b82219
commit 1d22dc8b25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,7 @@
import * as React from "react"
import * as RechartsPrimitive from "recharts"
import { cn } from "@/lib/utils"
// Format: { THEME_NAME: CSS_SELECTOR }
@ -104,6 +105,19 @@ ${colorConfig
const ChartTooltip = RechartsPrimitive.Tooltip
type ChartTooltipContentProps = React.ComponentProps<"div"> &
Omit<RechartsPrimitive.TooltipProps<any, any>, "content"> & {
active?: boolean
payload?: any[]
label?: any
hideLabel?: boolean
hideIndicator?: boolean
indicator?: "line" | "dot" | "dashed"
nameKey?: string
labelKey?: string
}
function ChartTooltipContent({
active,
payload,
@ -118,14 +132,9 @@ function ChartTooltipContent({
color,
nameKey,
labelKey,
}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
React.ComponentProps<"div"> & {
hideLabel?: boolean
hideIndicator?: boolean
indicator?: "line" | "dot" | "dashed"
nameKey?: string
labelKey?: string
}) {
}: ChartTooltipContentProps) {
const { config } = useChart()
const tooltipLabel = React.useMemo(() => {
@ -258,11 +267,13 @@ function ChartLegendContent({
payload,
verticalAlign = "bottom",
nameKey,
}: React.ComponentProps<"div"> &
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
}: React.ComponentProps<"div"> & {
payload?: any[]
verticalAlign?: "top" | "middle" | "bottom"
hideIcon?: boolean
nameKey?: string
}) {
const { config } = useChart()
if (!payload?.length) {