-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbfb666
commit 06d10c7
Showing
15 changed files
with
179 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
frontend/src/components/Displays/ConfirmScheduleDialogs/ConfirmScheduleDialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
frontend/src/components/Pages/FrontPage/MissionOverview/SafeZoneBanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Button, Icon, Typography } from '@equinor/eds-core-react' | ||
import { AlertCategory } from 'components/Alerts/AlertsBanner' | ||
import { useLanguageContext } from 'components/Contexts/LanguageContext' | ||
import styled from 'styled-components' | ||
|
||
const StyledDiv = styled.div` | ||
flex-direction: column; | ||
` | ||
|
||
const StyledAlertTitle = styled.div` | ||
display: flex; | ||
gap: 0.3em; | ||
align-items: flex-end; | ||
` | ||
|
||
const StyledButton = styled(Button)` | ||
text-align: left; | ||
height: auto; | ||
padding: 5px 5px; | ||
` | ||
|
||
interface SafeZoneBannerProps { | ||
alertCategory: AlertCategory | ||
} | ||
|
||
export const SafeZoneBanner = ({ alertCategory }: SafeZoneBannerProps): JSX.Element => { | ||
const { TranslateText } = useLanguageContext() | ||
|
||
return ( | ||
<StyledDiv> | ||
<StyledAlertTitle> | ||
<Icon name="error_outlined" /> | ||
<Typography> | ||
{alertCategory === AlertCategory.WARNING ? TranslateText('WARNING') : TranslateText('INFO')} | ||
</Typography> | ||
</StyledAlertTitle> | ||
<StyledButton variant="ghost" color="secondary"> | ||
{alertCategory === AlertCategory.WARNING | ||
? TranslateText('Safe zone banner text') | ||
: TranslateText('Dismiss safe zone banner text')} | ||
</StyledButton> | ||
</StyledDiv> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.