From 5732ef03034e5f1267c04b11408678e6a3dadb0a Mon Sep 17 00:00:00 2001 From: Eddasol <esole@equinor.com> Date: Fri, 29 Nov 2024 09:09:59 +0100 Subject: [PATCH] Fix styling of close button in NoMissionsDialog --- .../ScheduleMissionDialog/NoMissionsDialog.tsx | 14 +++++--------- .../Pages/RobotPage/RobotArmMovement.tsx | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/Pages/FrontPage/MissionOverview/ScheduleMissionDialog/NoMissionsDialog.tsx b/frontend/src/components/Pages/FrontPage/MissionOverview/ScheduleMissionDialog/NoMissionsDialog.tsx index 0a8040c2c..3af57a00f 100644 --- a/frontend/src/components/Pages/FrontPage/MissionOverview/ScheduleMissionDialog/NoMissionsDialog.tsx +++ b/frontend/src/components/Pages/FrontPage/MissionOverview/ScheduleMissionDialog/NoMissionsDialog.tsx @@ -1,13 +1,7 @@ import { Button, Typography } from '@equinor/eds-core-react' -import styled from 'styled-components' import { useLanguageContext } from 'components/Contexts/LanguageContext' import { StyledDialog } from 'components/Styles/StyledComponents' -const StyledButton = styled(Button)` - display: flex; - justify-content: end; -` - export const NoMissionsDialog = ({ closeDialog }: { closeDialog: () => void }): JSX.Element => { const { TranslateText } = useLanguageContext() return ( @@ -20,9 +14,11 @@ export const NoMissionsDialog = ({ closeDialog }: { closeDialog: () => void }): {TranslateText('This installation does not have missions. Please create mission.')} </Typography> </StyledDialog.Content> - <StyledButton onClick={closeDialog} variant="outlined"> - {TranslateText('Cancel')} - </StyledButton> + <StyledDialog.Actions> + <Button onClick={closeDialog} variant="outlined"> + {TranslateText('Close')} + </Button> + </StyledDialog.Actions> </StyledDialog> ) } diff --git a/frontend/src/components/Pages/RobotPage/RobotArmMovement.tsx b/frontend/src/components/Pages/RobotPage/RobotArmMovement.tsx index 8005f06f9..4cb0efe83 100644 --- a/frontend/src/components/Pages/RobotPage/RobotArmMovement.tsx +++ b/frontend/src/components/Pages/RobotPage/RobotArmMovement.tsx @@ -129,9 +129,9 @@ const MoveRobotArm = ({ robot, armPosition, isRobotAvailable }: RobotProps) => { </StyledTextButton> <StyledDialog open={feedback !== ''}> {feedback} - <StyledCloseButton> + <StyledDialog.Actions> <Button onClick={() => setFeedback('')}>{TranslateText('Close')}</Button> - </StyledCloseButton> + </StyledDialog.Actions> </StyledDialog> </> )