blob: 50fd1ec658177bb5be5106d43494d70e034b5417 (
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;
|