Change variable name

This commit is contained in:
Jared He 2022-06-18 22:55:05 -04:00
parent 846f4549b0
commit a5fa8bd52a
2 changed files with 4 additions and 4 deletions

View File

@ -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}>

View File

@ -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>
</>
);