sendou.ink/components/top500/WeaponLineChart.tsx
2021-01-30 13:04:10 +02:00

27 lines
578 B
TypeScript

import { useMyTheme } from "hooks/common";
import { Line, LineChart } from "recharts";
interface WeaponLineChartProps {
getDataForChart: () => { count: number }[];
}
const WeaponLineChart: React.FC<WeaponLineChartProps> = ({
getDataForChart,
}) => {
const { themeColorHex } = useMyTheme();
return (
<LineChart width={300} height={100} data={getDataForChart()}>
<Line
type="monotone"
dataKey="count"
stroke={themeColorHex}
strokeWidth={2}
dot={false}
/>
</LineChart>
);
};
export default WeaponLineChart;