1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/project/Project/ProjectFeatureToggles/RowSelectCell/RowSelectCell.tsx
Fredrik Strand Oseberg ddd718fd23
refactor/reshape table (#5328)
This PR fixes a couple of issues with the pagination bar:

* Fixes an issue where padding bottom would be broken due to disabling
padding on the parent container
* Remove padding on the entire table to create more space and remove
header bar border radius as per discussion with @nicolaesocaciu
2023-11-14 08:44:36 +01:00

34 lines
784 B
TypeScript

import React from 'react';
import { Box, Checkbox, styled } from '@mui/material';
import { FC } from 'react';
import { BATCH_SELECT } from 'utils/testIds';
interface IRowSelectCellProps {
onChange: () => void;
checked: boolean;
title: string;
}
const StyledBoxCell = styled(Box)(({ theme }) => ({
display: 'flex',
justifyContent: 'center',
paddingLeft: theme.spacing(2),
}));
export const RowSelectCell: FC<IRowSelectCellProps> = ({
onChange,
checked,
title,
}) => (
<StyledBoxCell data-testid={BATCH_SELECT}>
<Checkbox
onChange={onChange}
title={title}
checked={checked}
data-loading
/>
</StyledBoxCell>
);
export const MemoizedRowSelectCell = React.memo(RowSelectCell);