aboutsummaryrefslogtreecommitdiff
path: root/src/components/LineIcon.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2025-03-03 18:54:35 +0100
committerAriel Costas Guerrero <94913521+arielcostas@users.noreply.github.com>2025-03-03 18:54:35 +0100
commit3aa6eee0f54dec3e4f92be2ad335a04145ac4db8 (patch)
tree9ccffabd2972249322ebaa6d1de26289d7a41a4c /src/components/LineIcon.tsx
parentd3726e50167ed07c483c542cf6739f103dda0dd5 (diff)
Improve the UI
Diffstat (limited to 'src/components/LineIcon.tsx')
-rw-r--r--src/components/LineIcon.tsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/LineIcon.tsx b/src/components/LineIcon.tsx
new file mode 100644
index 0000000..50fd1ec
--- /dev/null
+++ b/src/components/LineIcon.tsx
@@ -0,0 +1,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; \ No newline at end of file