diff --git a/src/components/ConfirmDialog/ConfirmDialog.styled.ts b/src/components/ConfirmDialog/ConfirmDialog.styled.ts new file mode 100644 index 00000000..59012203 --- /dev/null +++ b/src/components/ConfirmDialog/ConfirmDialog.styled.ts @@ -0,0 +1,11 @@ +import { Dialog } from '@equinor/eds-core-react'; +import styled from 'styled-components'; +import { spacings } from '../../tokens/spacings'; + +export const Actions = styled(Dialog.Actions)` + display: flex; + flex: row; + flex-direction: row; + column-gap: ${spacings.SMALL}; + align-items: start; +`; diff --git a/src/components/ConfirmDialog/ConfirmDialog.tsx b/src/components/ConfirmDialog/ConfirmDialog.tsx index 6987b2fd..6b004e9b 100644 --- a/src/components/ConfirmDialog/ConfirmDialog.tsx +++ b/src/components/ConfirmDialog/ConfirmDialog.tsx @@ -1,30 +1,36 @@ import { Button, Dialog, Typography } from '@equinor/eds-core-react'; +import * as Styled from './ConfirmDialog.styled'; export const ConfirmDialog = ({ isOpen, message, + danger, confirmAction, setIsOpen, }: { isOpen: boolean; message: string; + danger: boolean; confirmAction: () => void; setIsOpen: React.Dispatch>; }) => { return ( - - Confirm - {message} - - - - + + ); }; diff --git a/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx b/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx index c6af8416..679cc7f4 100644 --- a/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx +++ b/src/features/Compute/CaseGroup/CaseButtons/CaseButtons.tsx @@ -217,6 +217,7 @@ export const CaseButtons = ({ @@ -226,6 +227,7 @@ export const CaseButtons = ({ isOpen={saveConfirm} message="By pressing OK, the current case will be overwritten, deleting old results." + danger={false} confirmAction={handleConfirmSave} setIsOpen={setSaveConfirm} >