Skip to content

Commit

Permalink
Fix visual bug in metric config - boxes should not take up the entire…
Browse files Browse the repository at this point in the history
… height (#126)

Co-authored-by: Mahmoud <mahmoud@Mahmouds-MBP.cable.rcn.com>
  • Loading branch information
mxosman and Mahmoud committed Oct 31, 2022
1 parent 9d663bb commit e6cb934
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
Expand Up @@ -76,9 +76,8 @@ export const PanelContainerRight = styled.div`

export const MetricBoxBottomPaddingContainer = styled.div`
height: 100%;
display: flex;
flex-wrap: wrap;
padding-bottom: 100px;
width: 100%;
padding-bottom: 150px;
overflow-y: scroll;
`;

Expand Down Expand Up @@ -111,6 +110,11 @@ export const MetricBoxContainer = styled.div<MetricBoxContainerProps>`
}
`;

export const MetricBoxContainerWrapper = styled.div`
display: flex;
flex-wrap: wrap;
`;

export const MetricViewBoxContainer = styled(MetricBoxContainer)<{
selected?: boolean;
}>`
Expand Down
Expand Up @@ -41,6 +41,7 @@ import {
Metric,
MetricBox,
MetricBoxBottomPaddingContainer,
MetricBoxContainerWrapper,
MetricConfigurationDisplay,
MetricConfigurationWrapper,
MetricDefinitions,
Expand Down Expand Up @@ -525,17 +526,19 @@ export const MetricConfiguration: React.FC<{
{/* List Of Metrics */}
{filteredMetricSettings && !activeMetricKey && (
<MetricBoxBottomPaddingContainer>
{Object.values(filteredMetricSettings).map((metric) => (
<MetricBox
key={metric.key}
metricKey={metric.key}
displayName={metric.display_name}
frequency={metric.frequency as ReportFrequency}
description={metric.description}
enabled={metric.enabled}
setActiveMetricKey={setActiveMetricKey}
/>
))}
<MetricBoxContainerWrapper>
{Object.values(filteredMetricSettings).map((metric) => (
<MetricBox
key={metric.key}
metricKey={metric.key}
displayName={metric.display_name}
frequency={metric.frequency as ReportFrequency}
description={metric.description}
enabled={metric.enabled}
setActiveMetricKey={setActiveMetricKey}
/>
))}
</MetricBoxContainerWrapper>
</MetricBoxBottomPaddingContainer>
)}

Expand Down

0 comments on commit e6cb934

Please sign in to comment.