Change variable name

pull/19/head
Jared He 9 months ago
parent 846f4549b0
commit a5fa8bd52a
  1. 6
      components/PieChart.tsx
  2. 2
      pages/playground.tsx

@ -7,7 +7,7 @@ import styles from "./PieChart.module.css";
interface PieChartProps {
data: PieChartData[];
width: number;
textPadding: number;
labelWidth: number;
className?: string;
}
@ -16,8 +16,8 @@ interface PieChartData {
value: number;
}
export function PieChart({ width, textPadding, ...props }: PieChartProps) {
const pieWidth = width * 0.5 - textPadding;
export function PieChart({ width, labelWidth, ...props }: PieChartProps) {
const pieWidth = width * 0.5 - labelWidth;
return (
<svg className={props.className} width={width} height={width}>
<Group top={width * 0.5} left={width * 0.5}>

@ -9,7 +9,7 @@ export default function Home() {
<h1>Playground</h1>
<p>Show off your components here!</p>
<div style={{ padding: "30px" }}>
<PieChart data={mockPieData} width={800} textPadding={200} />
<PieChart data={mockPieData} width={800} labelWidth={200} />
</div>
</>
);

Loading…
Cancel
Save