Skip to content

Commit

Permalink
Fix styling of close button in NoMissionsDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddasol committed Dec 10, 2024
1 parent 4e1ff0c commit 5732ef0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -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>
)
}
4 changes: 2 additions & 2 deletions frontend/src/components/Pages/RobotPage/RobotArmMovement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
</>
)
Expand Down

0 comments on commit 5732ef0

Please sign in to comment.