Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
DEX-922 respond to code review feedback. Remove default maxHeight for…
Browse files Browse the repository at this point in the history
… Card component and replaced with optional styles, which was then implemented for ImageCard and StatusCard. Remove maxHeight from Card in relationshipCard, remove unused paperStyles from DataDisplay.
  • Loading branch information
Atticus29 committed Jul 21, 2022
1 parent a12ea15 commit 1873372
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/cards/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export default function Card({
title,
titleId,
htmlId = null,
maxHeight = 360,
overflow = 'auto',
overflowX = 'auto',
styles = {},
renderActions,
children,
}) {
Expand All @@ -35,7 +35,7 @@ export default function Card({
</Text>
{renderActions}
</div>
<div style={{ overflow, maxHeight, overflowX }}>
<div style={{ overflow, overflowX, ...styles }}>
{children}
</div>
</Paper>
Expand Down
2 changes: 1 addition & 1 deletion src/components/cards/RelationshipsCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export default function RelationshipsCard({
</div>
</DialogActions>
</StandardDialog>,
<Card title={title} titleId={titleId} maxHeight={600}>
<Card title={title} titleId={titleId}>
{/* // renderActions={
// <div>
// <IconButton
Expand Down
2 changes: 0 additions & 2 deletions src/components/dataDisplays/DataDisplay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ export default function DataDisplay({
sortExternally,
searchParams,
setSearchParams,
paperStyles = {},
tableStyles = {},
cellStyles = {},
stickyHeader = true,
Expand Down Expand Up @@ -262,7 +261,6 @@ export default function DataDisplay({
elevation={variant === 'secondary' ? 2 : undefined}
style={{
maxHeight,
...paperStyles,
}}
>
<Table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ export default function SpeciesEditor({
)}
<DataDisplay
cellStyles={{ padding: '0 8px 0 12px' }}
paperStyles={{ maxHeight: 360 }}
style={{ marginTop: 12 }}
noTitleBar
variant="secondary"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/match/ImageCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function ImageCard({ titleId, annotation }) {
);

return (
<Card titleId={titleId} maxHeight="unset">
<Card titleId={titleId} styles={{ maxHeight: 'unset' }}>
<AnnotatedPhotograph
assetMetadata={{
alt: 'Selected query annotation',
Expand Down
5 changes: 4 additions & 1 deletion src/pages/sighting/statusCard/StatusCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ export default function StatusCard({ sightingData }) {
}

return (
<Card titleId="IDENTIFICATION_PIPELINE_STATUS" maxHeight={900}>
<Card
titleId="IDENTIFICATION_PIPELINE_STATUS"
styles={{ maxHeight: 900 }}
>
<Timeline>
<TimelineStep
Icon={ReportIcon}
Expand Down

0 comments on commit 1873372

Please sign in to comment.