Skip to content

Commit

Permalink
feat(board): removed use of thirdparty colors (#1130)
Browse files Browse the repository at this point in the history
* feat(board): removed use of thirdparty colors

* chore(table): removed colors utils file

* fix(line): changed variable name in line to transportmodecolor

* fix(table): fixed fontsize in table
  • Loading branch information
vildeopp authored Jul 17, 2023
1 parent 0c2a1ef commit afc5a3f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 59 deletions.
11 changes: 3 additions & 8 deletions next-tavla/src/Board/scenarios/Table/components/Line/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import { useNonNullContext } from 'hooks/useNonNullContext'
import { getPresentation } from 'Board/utils/colors'
import { DepartureContext } from '../../contexts'
import classes from './styles.module.css'

function Line() {
const departure = useNonNullContext(DepartureContext)

const presentation = getPresentation(
departure.serviceJourney.line.presentation,
departure.serviceJourney.line.id,
departure.serviceJourney.transportMode,
)
const mode = departure.serviceJourney.transportMode ?? 'unknown'
const transportModeColor = `var(--table-transport-${mode}-color)`

const publicCode = departure.serviceJourney.line.publicCode

Expand All @@ -19,8 +15,7 @@ function Line() {
<div
className={classes.lineWrapper}
style={{
backgroundColor: presentation.backgroundColor,
color: presentation.color,
backgroundColor: transportModeColor,
}}
>
{publicCode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
padding: 0.25em;
border-radius: 0.2em;
font-size: 1.25em;
font-weight: 500;
font-weight: 700;
color: var(--main-background-color);
}
50 changes: 0 additions & 50 deletions next-tavla/src/Board/utils/colors.ts

This file was deleted.

0 comments on commit afc5a3f

Please sign in to comment.