Skip to content

Commit

Permalink
fix(boards):Text color preview (#1586)
Browse files Browse the repository at this point in the history
* fix(boards): text color on no departure, different themes

* feat(preview): dark mode preview boards
  • Loading branch information
purusott authored Jul 15, 2024
1 parent 8c1f8bf commit 20e585f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion next-tavla/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function Landing() {
<div className="flex flex-col xl:flex-row gap-4">
<div
className="xl:w-1/2 h-[60vh] overflow-y-hidden rounded-2xl"
data-theme="entur"
data-theme="dark"
>
<Preview boards={previewBoards} />
</div>
Expand Down
6 changes: 4 additions & 2 deletions next-tavla/src/Board/scenarios/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ function Table({
</div>
)

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

if (departures.length === 0)
return (
Expand All @@ -43,7 +45,7 @@ function Table({
alt=""
className="h-[6em] w-[6em] lg:h-[15em] lg:w-[15em] sm:max-h-[10em] sm:max-w-[10em]"
/>
<Paragraph className="text-primary sm:pb-8 ">
<Paragraph className="!text-primary sm:pb-8 ">
Ingen avganger de neste 24 timene.
</Paragraph>
</div>
Expand Down

0 comments on commit 20e585f

Please sign in to comment.