aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/LineIcon.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-06-24 13:29:50 +0200
committerAriel Costas Guerrero <ariel@costas.dev>2025-06-24 13:29:50 +0200
commit894e67863dbb89a4819e825fcdf7117021082b2a (patch)
treefb544ef7fa99ff86489717e793595f503783bb72 /src/frontend/app/components/LineIcon.tsx
parent7dd9ea97a2f34a35e80c28d59d046f839eb6c60b (diff)
Replace leaflet for maplibre, use react-router in framework mode
Diffstat (limited to 'src/frontend/app/components/LineIcon.tsx')
-rw-r--r--src/frontend/app/components/LineIcon.tsx17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/frontend/app/components/LineIcon.tsx b/src/frontend/app/components/LineIcon.tsx
new file mode 100644
index 0000000..291b444
--- /dev/null
+++ b/src/frontend/app/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;