Skip to content

Commit

Permalink
Reduce inline styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Jan 29, 2025
1 parent 6c5fa46 commit 6f26595
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import {
StyledInspectionCards,
StyledInspectionContent,
StyledInspectionData,
StyledSection,
StyledInspectionOverviewDialogView,
StyledInspectionOverviewSection,
} from './InspectionStyles'
import { Typography } from '@equinor/eds-core-react'
import { GetInspectionImage } from './InspectionReportUtilities'
Expand Down Expand Up @@ -59,31 +60,17 @@ export const InspectionOverviewSection = ({ tasks }: { tasks: Task[] }) => {
const { TranslateText } = useLanguageContext()

return (
<StyledSection
style={{
width: 'auto',
borderColor: 'auto',
padding: 'auto',
maxHeight: 'auto',
}}
>
<StyledInspectionOverviewSection>
<Typography variant="h4">{TranslateText('Last completed inspection')}</Typography>
<InspectionOverview tasks={tasks} />
</StyledSection>
</StyledInspectionOverviewSection>
)
}

export const InspectionOverviewDialogView = ({ tasks }: { tasks: Task[] }) => {
return (
<StyledSection
style={{
width: '350px',
borderColor: 'white',
padding: '0px',
maxHeight: '60vh',
}}
>
<StyledInspectionOverviewDialogView>
<InspectionOverview tasks={tasks} />
</StyledSection>
</StyledInspectionOverviewDialogView>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,25 @@ export const StyledInfoContent = styled.div`
align-items: flex-start;
`

export const StyledSection = styled.div`
export const StyledInspectionOverviewSection = styled.div`
display: flex;
padding: 24px;
min-width: 240px;
flex-direction: column;
align-items: flex-start;
gap: 8px;
border-radius: 6px;
border: 1.194px solid ${tokens.colors.ui.background__medium.hex};
border: 1px solid ${tokens.colors.ui.background__medium.hex};
background: ${tokens.colors.ui.background__default.hex};
`

export const StyledInspectionOverviewDialogView = styled.div`
display: flex;
max-height: 60vh;
width: 350px;
flex-direction: column;
align-items: flex-start;
gap: 8px;
overflow-y: scroll;
`

Expand Down

0 comments on commit 6f26595

Please sign in to comment.