blob: 3d613e626a2e85f546bfa54a9d27ebb20d43747b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import React from "react";
import "./LineIcon.css";
interface LineIconProps {
line: string;
}
const LineIcon: React.FC<LineIconProps> = ({ line }) => {
const formattedLine = /^[a-zA-Z]/.test(line) ? line : `L${line}`;
return (
<span className={`line-icon line-${formattedLine.toLowerCase()}`}>
{formattedLine}
</span>
);
};
export default LineIcon;
|