Skip to content

Commit 6a9f033

Browse files
fix(core): update TypeScript definitions and resolve API compatibility issues
1 parent 89d0a13 commit 6a9f033

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/components/ui/calendar.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ function Calendar({
5454
...classNames,
5555
}}
5656
components={{
57-
IconLeft: ({ className, ...props }) => (
58-
<ChevronLeft className={cn("h-4 w-4", className)} {...props} />
59-
),
60-
IconRight: ({ className, ...props }) => (
61-
<ChevronRight className={cn("h-4 w-4", className)} {...props} />
62-
),
57+
Chevron: ({ ...props }) => {
58+
if (props.orientation === "left") {
59+
return <ChevronLeft className={cn("h-4 w-4", props.className)} />
60+
}
61+
return <ChevronRight className={cn("h-4 w-4", props.className)} />
62+
},
6363
}}
6464
{...props}
6565
/>

src/components/ui/chart.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ const ChartTooltipContent = React.forwardRef<
128128
color,
129129
nameKey,
130130
labelKey,
131-
},
132-
ref
131+
}: any,
132+
ref: any
133133
) => {
134134
const { config } = useChart()
135135

@@ -185,7 +185,7 @@ const ChartTooltipContent = React.forwardRef<
185185
>
186186
{!nestLabel ? tooltipLabel : null}
187187
<div className="grid gap-1.5">
188-
{payload.map((item, index) => {
188+
{payload.map((item: any, index: number) => {
189189
const key = `${nameKey || item.name || item.dataKey || "value"}`
190190
const itemConfig = getPayloadConfigFromPayload(config, item, key)
191191
const indicatorColor = color || item.payload.fill || item.color
@@ -261,14 +261,14 @@ const ChartLegend = RechartsPrimitive.Legend
261261
const ChartLegendContent = React.forwardRef<
262262
HTMLDivElement,
263263
React.ComponentProps<"div"> &
264-
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
264+
Pick<RechartsPrimitive.LegendProps, any> & {
265265
hideIcon?: boolean
266266
nameKey?: string
267267
}
268268
>(
269269
(
270-
{ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey },
271-
ref
270+
{ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }: any,
271+
ref: any
272272
) => {
273273
const { config } = useChart()
274274

@@ -285,7 +285,7 @@ const ChartLegendContent = React.forwardRef<
285285
className
286286
)}
287287
>
288-
{payload.map((item) => {
288+
{(payload as any[]).map((item) => {
289289
const key = `${nameKey || item.dataKey || "value"}`
290290
const itemConfig = getPayloadConfigFromPayload(config, item, key)
291291

src/lib/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ export type DescriptiveStat = {
3232
std: string;
3333
};
3434

35-
export { FirebaseUser };
35+
export type { FirebaseUser };

0 commit comments

Comments
 (0)