X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1933452553965a2066191eccaaa40943d6d5c5d8..109103ee47da299c04ffdcabebc38bcd665555d9:/src/views-components/dialog-create/dialog-project-create.tsx diff --git a/src/views-components/dialog-create/dialog-project-create.tsx b/src/views-components/dialog-create/dialog-project-create.tsx index 475f83714d..48b89115e4 100644 --- a/src/views-components/dialog-create/dialog-project-create.tsx +++ b/src/views-components/dialog-create/dialog-project-create.tsx @@ -8,13 +8,15 @@ import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle from '@material-ui/core/DialogTitle'; -import { Button, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core'; +import { Button, StyleRulesCallback, WithStyles, withStyles, CircularProgress } from '@material-ui/core'; import Validator from '../../utils/dialog-validator'; interface ProjectCreateProps { open: boolean; + pending: boolean; handleClose: () => void; + onSubmit: (data: { name: string, description: string }) => void; } interface DialogState { @@ -33,8 +35,8 @@ class DialogProjectCreate extends React.Component} /> - - + + + {pending && } ); } + handleSubmit = () => { + this.props.onSubmit({ + name: this.state.name, + description: this.state.description + }); + } + handleProjectName(e: any) { this.setState({ name: e.target.value, @@ -104,7 +120,7 @@ class DialogProjectCreate extends React.Component = theme => ({ button: { @@ -126,6 +142,11 @@ const styles: StyleRulesCallback = theme => ({ dialog: { minWidth: "600px", minHeight: "320px" + }, + createProgress: { + position: "absolute", + minWidth: "20px", + right: "95px" } });