From 99b9ab8145848319f66be496f6d316f7c6ad27ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Thu, 5 Dec 2024 09:05:11 +0000 Subject: [PATCH 1/2] fix: permission button unintended full width behavior --- .../common/PermissionButton/PermissionButton.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/component/common/PermissionButton/PermissionButton.tsx b/frontend/src/component/common/PermissionButton/PermissionButton.tsx index 9a1b5078920c..1286590f918c 100644 --- a/frontend/src/component/common/PermissionButton/PermissionButton.tsx +++ b/frontend/src/component/common/PermissionButton/PermissionButton.tsx @@ -1,4 +1,4 @@ -import { Button, type ButtonProps } from '@mui/material'; +import { Button, styled, type ButtonProps } from '@mui/material'; import Lock from '@mui/icons-material/Lock'; import React from 'react'; import { @@ -12,6 +12,11 @@ import { useHasProjectEnvironmentAccess, } from 'hooks/useHasAccess'; +const StyledButton = styled(Button)({ + justifySelf: 'start', + alignSelf: 'start', +}); + export interface IPermissionButtonProps extends Omit { permission: string | string[]; onClick?: (e: any) => void; @@ -104,7 +109,7 @@ const BasePermissionButton = React.forwardRef< title={formatAccessText(access, tooltipProps?.title)} arrow > - + ); }, From 9c99929baa0f1d0a1b3f620816776a4c1a432d18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Thu, 5 Dec 2024 09:07:50 +0000 Subject: [PATCH 2/2] test: update snap --- .../__tests__/__snapshots__/TagTypeList.test.tsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/component/tags/TagTypeList/__tests__/__snapshots__/TagTypeList.test.tsx.snap b/frontend/src/component/tags/TagTypeList/__tests__/__snapshots__/TagTypeList.test.tsx.snap index 56195a34a98f..557164a85119 100644 --- a/frontend/src/component/tags/TagTypeList/__tests__/__snapshots__/TagTypeList.test.tsx.snap +++ b/frontend/src/component/tags/TagTypeList/__tests__/__snapshots__/TagTypeList.test.tsx.snap @@ -75,7 +75,7 @@ exports[`renders an empty list correctly 1`] = ` />