1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-28 00:17:12 +01:00

fix: align project roles checkboxes (#9123)

Fix checkbox alignment and grouping
This commit is contained in:
Tymoteusz Czech 2025-01-21 11:34:20 +01:00 committed by GitHub
parent f268e1fba7
commit 08a28c99d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 14 deletions

View File

@ -1,10 +1,4 @@
import {
Box,
Checkbox,
FormControlLabel,
styled,
Typography,
} from '@mui/material';
import { Box, Checkbox, FormControlLabel } from '@mui/material';
import type { IPermission } from 'interfaces/permissions';
type RolePermissionProjectItemProps = {
@ -15,11 +9,6 @@ type RolePermissionProjectItemProps = {
isParentPermissionChecked?: boolean;
};
const StyledLabel = styled(Typography)(({ theme }) => ({
lineHeight: 1.2,
marginBottom: theme.spacing(1),
}));
export const RolePermissionProjectItem = ({
permission,
onChange,
@ -43,7 +32,7 @@ export const RolePermissionProjectItem = ({
disabled={isParentPermissionChecked}
/>
}
label={<StyledLabel>{permission.displayName}</StyledLabel>}
label={permission.displayName}
/>
</Box>
);

View File

@ -205,6 +205,7 @@ export const PROJECT_PERMISSIONS_STRUCTURE: ProjectPermissionCategory[] = [
[PROJECT_DEFAULT_STRATEGY_WRITE, UPDATE_PROJECT],
[PROJECT_SETTINGS_READ, UPDATE_PROJECT],
[PROJECT_SETTINGS_WRITE, UPDATE_PROJECT],
[DELETE_PROJECT],
],
},
{
@ -213,7 +214,6 @@ export const PROJECT_PERMISSIONS_STRUCTURE: ProjectPermissionCategory[] = [
[READ_PROJECT_API_TOKEN],
[CREATE_PROJECT_API_TOKEN],
[DELETE_PROJECT_API_TOKEN],
[DELETE_PROJECT],
],
},
{