From 606ab6d3dab1f166c52e471052652460c915f00f Mon Sep 17 00:00:00 2001 From: Pawel Kowalczyk Date: Wed, 4 Jul 2018 12:55:08 +0200 Subject: [PATCH] Project-creation-modal-first-step Feature #13694 Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk --- src/components/dialog-create/dialog-create.js | 62 +++++++++++++++++++ src/views/project-panel/project-panel.tsx | 59 +++++++++++++++++- 2 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 src/components/dialog-create/dialog-create.js diff --git a/src/components/dialog-create/dialog-create.js b/src/components/dialog-create/dialog-create.js new file mode 100644 index 0000000000..5361a2d7bf --- /dev/null +++ b/src/components/dialog-create/dialog-create.js @@ -0,0 +1,62 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + +import React from 'react'; +import Button from '@material-ui/core/Button'; +import TextField from '@material-ui/core/TextField'; +import Dialog from '@material-ui/core/Dialog'; +import DialogActions from '@material-ui/core/DialogActions'; +import DialogContent from '@material-ui/core/DialogContent'; +import DialogContentText from '@material-ui/core/DialogContentText'; +import DialogTitle from '@material-ui/core/DialogTitle'; + +export default class FormDialog extends React.Component { + state = { + open: false, + }; + + handleClickOpen = () => { + this.setState({ open: true }); + }; + + handleClose = () => { + this.setState({ open: false }); + }; + + render() { + return ( +
+ + + Subscribe + + + To subscribe to this website, please enter your email address here. We will send + updates occasionally. + + + + + + + + +
+ ); + } +} \ No newline at end of file diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx index 6bfa61e032..4522f163cb 100644 --- a/src/views/project-panel/project-panel.tsx +++ b/src/views/project-panel/project-panel.tsx @@ -3,6 +3,11 @@ // SPDX-License-Identifier: AGPL-3.0 import * as React from 'react'; +import TextField from '@material-ui/core/TextField'; +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 { ProjectPanelItem } from './project-panel-item'; import { Grid, Typography, Button, Toolbar, StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core'; import { formatDate, formatFileSize } from '../../common/formatters'; @@ -28,6 +33,18 @@ type ProjectPanelProps = { & WithStyles & RouteComponentProps<{ id: string }>; class ProjectPanel extends React.Component { + state = { + open: false, + }; + + handleClickOpen = () => { + this.setState({ open: true }); + } + + handleClose = () => { + this.setState({ open: false }); + } + render() { return
@@ -37,9 +54,33 @@ class ProjectPanel extends React.Component { - + +
+ Create a project + + + + + + + + +
+
{ } -type CssRules = "toolbar" | "button"; +type CssRules = "toolbar" | "button" | "lastButton" | "dialogContent" | "textField" | "dialog"; const styles: StyleRulesCallback = theme => ({ toolbar: { @@ -104,6 +145,20 @@ const styles: StyleRulesCallback = theme => ({ }, button: { marginLeft: theme.spacing.unit + }, + lastButton: { + marginLeft: theme.spacing.unit, + marginRight: "20px", + }, + dialogContent: { + marginTop: "20px", + }, + textField: { + marginBottom: "32px", + }, + dialog: { + minWidth: "550px", + minHeight: "320px" } }); -- 2.30.2