mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
feat: add borders and spacing to feature impact metrics (#10625)
This commit is contained in:
parent
33d898f684
commit
82c79a8216
@ -1,6 +1,6 @@
|
||||
import { PageContent } from 'component/common/PageContent/PageContent.tsx';
|
||||
import { PageHeader } from '../../../common/PageHeader/PageHeader.tsx';
|
||||
import { styled, Typography } from '@mui/material';
|
||||
import { Box, styled, Typography } from '@mui/material';
|
||||
import Add from '@mui/icons-material/Add';
|
||||
import { useImpactMetricsMetadata } from 'hooks/api/getters/useImpactMetricsMetadata/useImpactMetricsMetadata.ts';
|
||||
import { type FC, useMemo, useState } from 'react';
|
||||
@ -151,7 +151,9 @@ export const FeatureImpactMetrics: FC = () => {
|
||||
/>
|
||||
|
||||
{impactMetrics.configs.length > 0 && (
|
||||
<GridLayoutWrapper items={gridItems} />
|
||||
<Box sx={(theme) => ({ marginTop: theme.spacing(3) })}>
|
||||
<GridLayoutWrapper items={gridItems} />
|
||||
</Box>
|
||||
)}
|
||||
|
||||
<ChartConfigModal
|
||||
|
@ -52,6 +52,10 @@ type GridLayoutWrapperProps = {
|
||||
rowHeight?: number;
|
||||
};
|
||||
|
||||
const ItemContainer = styled('div')(({ theme }) => ({
|
||||
border: `1px solid ${theme.palette.divider}`,
|
||||
}));
|
||||
|
||||
export const GridLayoutWrapper: FC<GridLayoutWrapperProps> = ({
|
||||
items,
|
||||
onLayoutChange,
|
||||
@ -102,7 +106,10 @@ export const GridLayoutWrapper: FC<GridLayoutWrapperProps> = ({
|
||||
}, [items, cols, isMobileBreakpoint]);
|
||||
|
||||
const children = useMemo(
|
||||
() => items.map((item) => <div key={item.id}>{item.component}</div>),
|
||||
() =>
|
||||
items.map((item) => (
|
||||
<ItemContainer key={item.id}>{item.component}</ItemContainer>
|
||||
)),
|
||||
[items],
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user