// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; import { InjectedFormProps } from 'redux-form'; import { Dialog, DialogActions, DialogContent, DialogTitle } from '@material-ui/core/'; import { Button, StyleRulesCallback, WithStyles, withStyles, CircularProgress } from '@material-ui/core'; import { WithDialogProps } from '~/store/dialog/with-dialog'; type CssRules = "button" | "lastButton" | "formContainer" | "dialogTitle" | "progressIndicator" | "dialogActions"; const styles: StyleRulesCallback = theme => ({ button: { marginLeft: theme.spacing.unit }, lastButton: { marginLeft: theme.spacing.unit, marginRight: "20px", }, formContainer: { display: "flex", flexDirection: "column", marginTop: "20px", }, dialogTitle: { paddingBottom: "0" }, progressIndicator: { position: "absolute", minWidth: "20px", }, dialogActions: { marginBottom: theme.spacing.unit * 3 } }); interface DialogProjectDataProps { cancelLabel?: string; dialogTitle: string; formFields: React.ComponentType & WithDialogProps>; submitLabel?: string; } type DialogProjectProps = DialogProjectDataProps & WithDialogProps<{}> & InjectedFormProps & WithStyles; export const FormDialog = withStyles(styles)((props: DialogProjectProps) =>
{props.dialogTitle}
);