aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/LineIcon.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/app/components/LineIcon.tsx')
-rw-r--r--src/frontend/app/components/LineIcon.tsx15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/frontend/app/components/LineIcon.tsx b/src/frontend/app/components/LineIcon.tsx
index ef05987..8e9a4bd 100644
--- a/src/frontend/app/components/LineIcon.tsx
+++ b/src/frontend/app/components/LineIcon.tsx
@@ -8,7 +8,11 @@ interface LineIconProps {
rounded?: boolean;
}
-const LineIcon: React.FC<LineIconProps> = ({ line, region = "vigo", rounded = false }) => {
+const LineIcon: React.FC<LineIconProps> = ({
+ line,
+ region = "vigo",
+ rounded = false,
+}) => {
const formattedLine = useMemo(() => {
return /^[a-zA-Z]/.test(line) ? line : `L${line}`;
}, [line]);
@@ -17,8 +21,13 @@ const LineIcon: React.FC<LineIconProps> = ({ line, region = "vigo", rounded = fa
return (
<span
- className={rounded ? 'line-icon-rounded' : 'line-icon'}
- style={{ '--line-colour': `var(${cssVarName})`, '--line-text-colour': `var(${cssTextVarName}, unset)` } as React.CSSProperties}
+ className={rounded ? "line-icon-rounded" : "line-icon"}
+ style={
+ {
+ "--line-colour": `var(${cssVarName})`,
+ "--line-text-colour": `var(${cssTextVarName}, unset)`,
+ } as React.CSSProperties
+ }
>
{line}
</span>