import styled from '@emotion/styled'; import {Button, LinkButton} from 'sentry/components/button'; import ButtonBar from 'sentry/components/buttonBar'; import Confirm from 'sentry/components/confirm'; import type {LinkProps} from 'sentry/components/links/link'; import {t} from 'sentry/locale'; import {space} from 'sentry/styles/space'; interface Props { goBackLocation: LinkProps['to']; invalidForm: boolean; onSave: (event: React.MouseEvent) => void; isEditing?: boolean; onDelete?: () => void; } export function Footer({ goBackLocation, onSave, onDelete, invalidForm, isEditing, }: Props) { return ( {t('Cancel')} {isEditing && onDelete && ( )} ); } const Actions = styled(ButtonBar)` justify-content: flex-end; max-width: 1000px; padding: ${space(4)} ${space(2)}; /* to match Layout.Main padding + Field padding-right */ padding-right: calc(${space(2)} + ${space(2)}); @media (min-width: ${p => p.theme.breakpoints.medium}) { padding: ${space(4)}; /* to match Layout.Main padding + Field padding-right */ padding-right: calc(${space(4)} + ${space(2)}); } `; const Wrapper = styled('div')` background: ${p => p.theme.background}; border-top: 1px solid ${p => p.theme.gray200}; `;