// 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" | "textField" | "dialog" | "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" }, textField: { marginTop: "32px", }, dialog: { minWidth: "600px", minHeight: "320px" }, progressIndicator: { position: "absolute", minWidth: "20px", }, dialogActions: { marginBottom: "24px" } }); interface DialogProjectProps { cancelLabel?: string; dialogTitle: string; formFields: React.ComponentType>; submitLabel?: string; } export const FormDialog = withStyles(styles)((props: DialogProjectProps & WithDialogProps<{}> & InjectedFormProps & WithStyles) =>
{props.dialogTitle}
);