Files
HiveGrid-Wireframes/hivegrid-cloud/apps/web/app/ui/components/AreaChart/AreaChart.tsx
T

43 lines
1015 B
TypeScript

"use client";
/*
* Documentation:
* Area Chart — https://app.subframe.com/f023064a5ca0/library?component=Area+Chart_8aa1e7b3-5db6-4a62-aa49-137ced21a231
*/
import React from "react";
import * as SubframeCore from "@subframe/core";
import * as SubframeUtils from "../../utils";
export interface AreaChartRootProps
extends React.ComponentProps<typeof SubframeCore.AreaChart> {
stacked?: boolean;
className?: string;
}
const AreaChartRoot = React.forwardRef<
React.ElementRef<typeof SubframeCore.AreaChart>,
AreaChartRootProps
>(function AreaChartRoot(
{ stacked = false, className, ...otherProps }: AreaChartRootProps,
ref
) {
return (
<SubframeCore.AreaChart
className={SubframeUtils.twClassNames("h-80 w-full", className)}
ref={ref}
stacked={stacked}
colors={[
"#3b82f6",
"#bfdbfe",
"#2563eb",
"#93c5fd",
"#1d4ed8",
"#60a5fa",
]}
{...otherProps}
/>
);
});
export const AreaChart = AreaChartRoot;