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:
parent
f268e1fba7
commit
08a28c99d6
@ -1,10 +1,4 @@
|
|||||||
import {
|
import { Box, Checkbox, FormControlLabel } from '@mui/material';
|
||||||
Box,
|
|
||||||
Checkbox,
|
|
||||||
FormControlLabel,
|
|
||||||
styled,
|
|
||||||
Typography,
|
|
||||||
} from '@mui/material';
|
|
||||||
import type { IPermission } from 'interfaces/permissions';
|
import type { IPermission } from 'interfaces/permissions';
|
||||||
|
|
||||||
type RolePermissionProjectItemProps = {
|
type RolePermissionProjectItemProps = {
|
||||||
@ -15,11 +9,6 @@ type RolePermissionProjectItemProps = {
|
|||||||
isParentPermissionChecked?: boolean;
|
isParentPermissionChecked?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const StyledLabel = styled(Typography)(({ theme }) => ({
|
|
||||||
lineHeight: 1.2,
|
|
||||||
marginBottom: theme.spacing(1),
|
|
||||||
}));
|
|
||||||
|
|
||||||
export const RolePermissionProjectItem = ({
|
export const RolePermissionProjectItem = ({
|
||||||
permission,
|
permission,
|
||||||
onChange,
|
onChange,
|
||||||
@ -43,7 +32,7 @@ export const RolePermissionProjectItem = ({
|
|||||||
disabled={isParentPermissionChecked}
|
disabled={isParentPermissionChecked}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
label={<StyledLabel>{permission.displayName}</StyledLabel>}
|
label={permission.displayName}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
@ -205,6 +205,7 @@ export const PROJECT_PERMISSIONS_STRUCTURE: ProjectPermissionCategory[] = [
|
|||||||
[PROJECT_DEFAULT_STRATEGY_WRITE, UPDATE_PROJECT],
|
[PROJECT_DEFAULT_STRATEGY_WRITE, UPDATE_PROJECT],
|
||||||
[PROJECT_SETTINGS_READ, UPDATE_PROJECT],
|
[PROJECT_SETTINGS_READ, UPDATE_PROJECT],
|
||||||
[PROJECT_SETTINGS_WRITE, UPDATE_PROJECT],
|
[PROJECT_SETTINGS_WRITE, UPDATE_PROJECT],
|
||||||
|
[DELETE_PROJECT],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -213,7 +214,6 @@ export const PROJECT_PERMISSIONS_STRUCTURE: ProjectPermissionCategory[] = [
|
|||||||
[READ_PROJECT_API_TOKEN],
|
[READ_PROJECT_API_TOKEN],
|
||||||
[CREATE_PROJECT_API_TOKEN],
|
[CREATE_PROJECT_API_TOKEN],
|
||||||
[DELETE_PROJECT_API_TOKEN],
|
[DELETE_PROJECT_API_TOKEN],
|
||||||
[DELETE_PROJECT],
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user