Skip to content

Commit 9ca0d22

Browse files
committed
Move CustomBarLabel to tsx
1 parent 103da67 commit 9ca0d22

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

src/components/GuideView/CustomBarLabel.js

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
type CustomBarLabelProps = {
2+
x: number;
3+
y: number;
4+
width: number;
5+
value: number | string;
6+
};
7+
8+
function CustomBarLabel(props: CustomBarLabelProps) {
9+
const { x, y, width, value } = props;
10+
11+
return <text x={x + width / 2} y={y} fill="#666" textAnchor="middle" dy={-6}>{`value: ${value}`}</text>;
12+
}
13+
14+
export default CustomBarLabel;

0 commit comments

Comments
 (0)