Skip to content

Commit

Permalink
Fix inspection report for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Feb 6, 2025
1 parent a25eec9 commit acfe89f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { Button, Card, Dialog } from '@equinor/eds-core-react'
import { tokens } from '@equinor/eds-tokens'
import { styled } from 'styled-components'

export const HiddenOnSmallScreen = styled.div`
@media (max-width: 600px) {
display: none;
}
`

export const StyledInspection = styled.img<{ $otherContentHeight?: string }>`
max-height: calc(80vh - ${(props) => props.$otherContentHeight});
max-width: 100%;
@media (max-width: 600px) {
width: 95vw;
}
`

export const StyledInspectionImage = styled.img`
Expand All @@ -21,10 +23,6 @@ export const StyledDialog = styled(Dialog)`
display: flex;
width: 100%;
max-height: 80vh;
@media (max-width: 600px) {
display: none;
}
`
export const StyledCloseButton = styled(Button)`
width: 24px;
Expand All @@ -47,6 +45,7 @@ export const StyledDialogHeader = styled.div`

export const StyledBottomContent = styled.div`
display: flex;
flex-wrap: wrap;
padding: 16px;
gap: 16px;
justify-content: space-between;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useLanguageContext } from 'components/Contexts/LanguageContext'
import { formatDateTime } from 'utils/StringFormatting'
import { useInspectionsContext } from 'components/Contexts/InspectionsContext'
import {
HiddenOnSmallScreen,
StyledBottomContent,
StyledCloseButton,
StyledDialog,
Expand Down Expand Up @@ -94,7 +95,9 @@ export const InspectionDialogView = ({ selectedTask, tasks }: InspectionDialogVi
)}
</StyledBottomContent>
</div>
<InspectionOverviewDialogView tasks={tasks} />
<HiddenOnSmallScreen>
<InspectionOverviewDialogView tasks={tasks} />
</HiddenOnSmallScreen>
</StyledDialogInspectionView>
</StyledDialogContent>
</StyledDialog>
Expand Down

0 comments on commit acfe89f

Please sign in to comment.