Skip to content

Commit

Permalink
fix: align project roles checkboxes (#9123)
Browse files Browse the repository at this point in the history
Fix checkbox alignment and grouping
  • Loading branch information
Tymek authored Jan 21, 2025
1 parent f268e1f commit 08a28c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -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,
Expand All @@ -43,7 +32,7 @@ export const RolePermissionProjectItem = ({
disabled={isParentPermissionChecked}
/>
}
label={<StyledLabel>{permission.displayName}</StyledLabel>}
label={permission.displayName}
/>
</Box>
);
2 changes: 1 addition & 1 deletion src/lib/types/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
],
},
{
Expand All @@ -213,7 +214,6 @@ export const PROJECT_PERMISSIONS_STRUCTURE: ProjectPermissionCategory[] = [
[READ_PROJECT_API_TOKEN],
[CREATE_PROJECT_API_TOKEN],
[DELETE_PROJECT_API_TOKEN],
[DELETE_PROJECT],
],
},
{
Expand Down

0 comments on commit 08a28c9

Please sign in to comment.