From b591bede4618b977942f63c4341308e7400a06a2 Mon Sep 17 00:00:00 2001 From: Jayasanka Date: Wed, 27 Mar 2019 22:11:42 +0530 Subject: [PATCH] added steps to create app --- .../react-app/src/index.css | 14 +++++ .../pages/dashboard/add-new-app/AddNewApp.js | 63 +++++++++++++++++-- 2 files changed, 71 insertions(+), 6 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.css b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.css index 99e53ee5b4..36d26ff0fb 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.css +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.css @@ -6,4 +6,18 @@ padding: 0; height: auto; box-shadow: 0 2px 8px #f0f1f2; +} + +.steps-content { + margin-top: 16px; + border: 1px dashed #e9e9e9; + border-radius: 6px; + background-color: #fafafa; + min-height: 200px; + text-align: center; + padding-top: 80px; +} + +.steps-action { + margin-top: 24px; } \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/AddNewApp.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/AddNewApp.js index 78aa81c372..f91b642adc 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/AddNewApp.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/add-new-app/AddNewApp.js @@ -1,6 +1,6 @@ import React from "react"; import "antd/dist/antd.css"; -import {PageHeader, Breadcrumb, Typography} from "antd"; +import {PageHeader, Typography, Card, Steps, Button, message} from "antd"; const Paragraph = Typography; @@ -19,22 +19,47 @@ const routes = [ }, ]; +const Step = Steps.Step; + +const steps = [{ + title: 'First', + content: 'First-content', +}, { + title: 'Second', + content: 'Second-content', +}, { + title: 'Last', + content: 'Last-content', +}]; + + class AddNewApp extends React.Component { - routes; constructor(props) { super(props); - this.routes = props.routes; + this.state = { + current: 0, + }; + } + + next() { + const current = this.state.current + 1; + this.setState({current}); } + prev() { + const current = this.state.current - 1; + this.setState({current}); + } render() { + const { current } = this.state; return (
@@ -44,8 +69,34 @@ class AddNewApp extends React.Component {
-
- +
+ +
+ + {steps.map(item => )} + +
{steps[current].content}
+
+ { + current < steps.length - 1 + && + } + { + current === steps.length - 1 + && + } + { + current > 0 + && ( + + ) + } +
+
+