Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit bda7a57

Browse files
committed
fix: use tablet breakpoint for mobile layout
1 parent 5144665 commit bda7a57

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

apps/ui/components/application/ApprovedReservations.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,15 @@ const H3 = styled(H5).attrs({ as: "h3" })`
6767
margin: 0;
6868
`;
6969

70+
const BREAKPOINT = breakpoints.m;
71+
7072
const ListContainer = styled.div`
7173
display: flex;
7274
flex-direction: column;
7375
gap: var(--spacing-m);
7476
7577
margin-top: var(--spacing-l);
76-
@media (width > ${breakpoints.s}) {
78+
@media (width > ${BREAKPOINT}) {
7779
margin-top: var(--spacing-xl);
7880
}
7981
`;
@@ -82,7 +84,7 @@ const ListContainer = styled.div`
8284
// NOTE HDS Table can't be styled so have to wrap it in an extra div.
8385
const TableWrapper = styled.div`
8486
/* Mobile uses cards, so no horizontal scroll */
85-
@media (width > ${breakpoints.s}) {
87+
@media (width > ${BREAKPOINT}) {
8688
& > div {
8789
overflow-x: auto;
8890
> table {
@@ -92,7 +94,7 @@ const TableWrapper = styled.div`
9294
}
9395
}
9496
95-
@media (width <= ${breakpoints.s}) {
97+
@media (width <= ${BREAKPOINT}) {
9698
&& table {
9799
/* border can't be in tr because it can't be styled */
98100
--border-width: 1px;
@@ -158,7 +160,7 @@ const ButtonContainer = styled.div`
158160
gap: var(--spacing-s);
159161
justify-content: center;
160162
flex-direction: row;
161-
@media (max-width: ${breakpoints.s}) {
163+
@media (max-width: ${BREAKPOINT}) {
162164
flex-direction: column;
163165
}
164166
`;
@@ -290,7 +292,7 @@ type ApplicationSectionT = NonNullable<QueryT["applicationSections"]>[0];
290292

291293
const OnlyForMobile = styled.span`
292294
display: inline;
293-
@media (width > ${breakpoints.s}) {
295+
@media (width > ${BREAKPOINT}) {
294296
display: none;
295297
}
296298
`;
@@ -304,7 +306,7 @@ const IconTextWrapper = styled.span`
304306
> svg {
305307
display: inline;
306308
}
307-
@media (width > ${breakpoints.s}) {
309+
@media (width > ${BREAKPOINT}) {
308310
> svg {
309311
display: none;
310312
}
@@ -340,7 +342,7 @@ function ReservationUnitTable({
340342

341343
const lang = getLocalizationLang(i18n.language);
342344

343-
const isMobile = useMedia(`(max-width: ${breakpoints.s})`, false);
345+
const isMobile = useMedia(`(max-width: ${BREAKPOINT})`, false);
344346

345347
const cols = [
346348
{
@@ -518,7 +520,7 @@ const CancelButton = styled(Button).attrs({
518520
`;
519521

520522
const StyledStatusLabel = styled(StatusLabel)`
521-
@media (width <= ${breakpoints.s}) {
523+
@media (width <= ${BREAKPOINT}) {
522524
position: absolute;
523525
right: var(--spacing-s);
524526
top: var(--spacing-s);

0 commit comments

Comments
 (0)