aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/app/components/LineIcon.tsx
diff options
context:
space:
mode:
authorAriel Costas Guerrero <ariel@costas.dev>2025-11-30 17:58:55 +0100
committerAriel Costas Guerrero <ariel@costas.dev>2025-11-30 17:58:55 +0100
commite7283ba10d45b42e1274cd13c3d6aabec57c85b4 (patch)
tree3e753b79c0835a0ecd4674b97039fcd3b53275a7 /src/frontend/app/components/LineIcon.tsx
parent0798325688049a87df02910ab9141c0b1c13ffcb (diff)
feat: add Tailwind CSS support and create ConsolidatedCirculationCard styles
- Added Tailwind CSS and its Vite plugin to the project dependencies. - Updated Vite configuration to include Tailwind CSS plugin. - Created a new CSS file for the Consolidated Circulation Card component with styles for various states and responsive design.
Diffstat (limited to 'src/frontend/app/components/LineIcon.tsx')
-rw-r--r--src/frontend/app/components/LineIcon.tsx16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/frontend/app/components/LineIcon.tsx b/src/frontend/app/components/LineIcon.tsx
index 8c3dbeb..5ccf80a 100644
--- a/src/frontend/app/components/LineIcon.tsx
+++ b/src/frontend/app/components/LineIcon.tsx
@@ -4,24 +4,28 @@ import "./LineIcon.css";
interface LineIconProps {
line: string;
+
+ /**
+ * @deprecated Unused since region is only Vigo
+ */
region?: RegionId;
- rounded?: boolean;
+
+ mode?: "rounded"|"pill"|"default";
}
const LineIcon: React.FC<LineIconProps> = ({
line,
- region = "vigo",
- rounded = false,
+ mode = "default",
}) => {
const formattedLine = useMemo(() => {
return /^[a-zA-Z]/.test(line) ? line : `L${line}`;
}, [line]);
- const cssVarName = `--line-${region}-${formattedLine.toLowerCase()}`;
- const cssTextVarName = `--line-${region}-${formattedLine.toLowerCase()}-text`;
+ const cssVarName = `--line-${formattedLine.toLowerCase()}`;
+ const cssTextVarName = `--line-${formattedLine.toLowerCase()}-text`;
return (
<span
- className={rounded ? "line-icon-rounded" : "line-icon"}
+ className={`line-icon-${mode}`}
style={
{
"--line-colour": `var(${cssVarName})`,