Skip to content

Commit

Permalink
feat(board): add scrolling in mobile view for boards with many tiles (#…
Browse files Browse the repository at this point in the history
…1780)

* feat(mobile): add scrolling for boards with many tiles

* chore(mobile): only allow y-axis scroll
  • Loading branch information
SelmaBergstrand authored Jan 10, 2025
1 parent 9a2f105 commit cf024a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tavla/src/Board/scenarios/Board/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Board({ board, style }: { board: TBoard; style?: CSSProperties }) {

return (
<div
className={`grid grid-cols-auto-fit-minmax gap-2.5 h-full overflow-hidden supports-[not(display:grid)]:flex supports-[not(display:grid)]:*:m-2.5 ${getFontScale(
className={`max-sm:overflow-y-scroll grid grid-cols-auto-fit-minmax gap-2.5 h-full overflow-hidden supports-[not(display:grid)]:flex supports-[not(display:grid)]:*:m-2.5 ${getFontScale(
board.meta?.fontSize || defaultFontSize(board),
)} `}
style={{
Expand Down
2 changes: 1 addition & 1 deletion tavla/src/Board/scenarios/QuayTile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function QuayTile({
.join(' ')

return (
<Tile className="flex flex-col">
<Tile className="flex flex-col max-sm:min-h-[30vh]">
<TableHeader
heading={displayName ?? heading}
walkingDistance={walkingDistance}
Expand Down
2 changes: 1 addition & 1 deletion tavla/src/Board/scenarios/StopPlaceTile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function StopPlaceTile({
}

return (
<Tile className="flex flex-col">
<Tile className="flex flex-col max-sm:min-h-[30vh]">
<TableHeader
heading={displayName ?? data.stopPlace.name}
walkingDistance={walkingDistance}
Expand Down

0 comments on commit cf024a9

Please sign in to comment.