Skip to content

Commit

Permalink
fix(table): no departures text visibility with many tiles (#1572)
Browse files Browse the repository at this point in the history
* fix(table): no departures text visibility with many tiles

* style(table): no departure image size on few tiles

* style(table): responsive image size on no departure tile,while keeping paragraph visible

* feat(table): light and darkmode pictures no departure board

* chore(table):remove console log
  • Loading branch information
purusott authored Jul 8, 2024
1 parent e0ec042 commit be2f69e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
16 changes: 11 additions & 5 deletions next-tavla/src/Board/scenarios/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { ExpectedTime } from './components/Time/ExpectedTime'
import { Line } from './components/Line'
import { StopPlaceDeviation } from './components/StopPlaceDeviation'
import Image from 'next/image'
import leafs from 'assets/illustrations/Leafs.png'
import leafs from 'assets/illustrations/leafs.svg'
import leafsLight from 'assets/illustrations/leafs-light.png'
import { Paragraph } from '@entur/typography'

function Table({
departures,
Expand All @@ -31,15 +33,19 @@ function Table({
</div>
)

const theme = document.querySelector('.root')?.getAttribute('data-theme')

if (departures.length === 0)
return (
<div className="flex flex-col items-center justify-center text-center h-full w-full text-em-sm">
<div className="flex flex-col items-center justify-center text-center h-full w-full text-em-sm pb-4">
<Image
src={leafs}
src={theme === 'light' ? leafsLight : leafs}
alt=""
className="h-[15em] w-[15em] aspect-square"
className="h-[6em] w-[6em] lg:h-[15em] lg:w-[15em] sm:max-h-[10em] sm:max-w-[10em]"
/>
Ingen avganger de neste 24 timene.
<Paragraph className="text-primary sm:pb-8 ">
Ingen avganger de neste 24 timene.
</Paragraph>
</div>
)

Expand Down
Loading

0 comments on commit be2f69e

Please sign in to comment.