Skip to content

Commit

Permalink
Merge pull request #36 from Jittojoyes98/develop
Browse files Browse the repository at this point in the history
fix: preview buttons
  • Loading branch information
Jittojoyes98 authored Jul 22, 2024
2 parents dff5dbc + d40a5cd commit f0cc4df
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 10 deletions.
1 change: 1 addition & 0 deletions assets/workspace.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src/Dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import CreateButton from "../_ui/CreateButton/CreateButton";
import dropDownSvg from "../../assets/empty.svg";
import { CircularProgressLoader } from "../_ui/Loader/CircularProgress";
import { addToLocalStorage, getDataFromLocalStorage } from "../_helpers/utils";
import DashboardStats from "./DashboardStats";

const Dashboard = () => {
const { currentUser, setCurrentUser, signOut } = useAuthContext();
Expand Down Expand Up @@ -50,7 +51,7 @@ const Dashboard = () => {
<div className="dashboard-wrapper">
<div className="dashboard-main">
<div className="left-dashboard-wrapper">
<p>Workspaces and Responses</p>
<DashboardStats />
</div>
<div className="right-dashboard-wrapper">
<div className="right-dashboard">
Expand Down
8 changes: 5 additions & 3 deletions src/Dashboard/DashboardCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,18 @@ const DashboardCard = ({ formData }) => {
<img src={dropDownSvg} alt="select" />
</Box>
<Menu
id="basic-menu"
id="form-action-menu"
anchorEl={anchorEl}
open={open}
onClose={handleClose}
MenuListProps={{
"aria-labelledby": "basic-button",
}}
>
<MenuItem onClick={handleClose}>Profile</MenuItem>
<MenuItem onClick={handleClose}>My account</MenuItem>
<MenuItem onClick={handleClose}>
<Link to={`/${formData.id}/results`}>Results</Link>
</MenuItem>
<MenuItem onClick={handleClose}>Rename</MenuItem>
<MenuItem onClick={handleDelete}>Delete</MenuItem>
</Menu>
</Box>
Expand Down
12 changes: 12 additions & 0 deletions src/Dashboard/DashboardStats.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Box from "@mui/material/Box";
import React from "react";

const DashboardStats = () => {
return (
<Box>
<p>Workspaces and Responses</p>
</Box>
);
};

export default DashboardStats;
7 changes: 6 additions & 1 deletion src/Editor/SortableItems.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@ const SortableItems = ({ id, selectedItem, item }) => {
const open = Boolean(anchorEl);

const handleClick = (event) => {
console.log(event.currentTarget.id);
// if (event) {
// event.stopPropagation();
// }
setAnchorEl(event.currentTarget);
};
const handleDelete = () => {
setAnchorEl(null);
deleteForms(formData.id);
};
const handleClose = () => {
const handleClose = (event) => {
// event.stopPropagation();
setAnchorEl(null);
};

Expand Down
3 changes: 1 addition & 2 deletions src/LoginPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ const LoginPage = () => {
},
validationSchema: loginSchema,
onSubmit: (values) => {
console.log(values);
handleForm(values.email, values.password);
},
});
Expand Down Expand Up @@ -115,7 +114,7 @@ const LoginPage = () => {
<div className="auth-form-wrapper">
{/* add a wrapper div here */}
<span className="centre-div">
<a href="/">
<a href="/" className="large-text-light">
{/* image will be used here now just the Name */}
Dropform
</a>
Expand Down
6 changes: 3 additions & 3 deletions src/_layout/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ const Header = ({ layout }) => {
</div>
<div>options</div>
<div className="auth-content">
<div>
<div className="centre-div ">
<div>
<Button>Preview</Button>
<Button className="secondary-button">Preview</Button>
</div>
<div>
<Button>Publish</Button>
<Button className="secondary-button">Publish</Button>
</div>
</div>

Expand Down
1 change: 1 addition & 0 deletions src/_styles/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
}
.left-dashboard-wrapper {
width: 256px;
padding: 0px 20px;
flex-shrink: 0;
}
.right-dashboard-wrapper {
Expand Down
22 changes: 22 additions & 0 deletions src/_styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,28 @@ img {
height: 100%;
}

#form-action-menu {
.MuiPaper-root {
box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 4px,
rgba(0, 0, 0, 0.06) 0px 2px 12px;
border-radius: 8px;
color: $body-text-color;
}
.MuiMenuItem-root {
font-size: 14px;
font-family: $font-family;
}
.MuiMenuItem-root:first-child {
background-color: $white-color;
}
.MuiMenuItem-root:last-child {
color: $delete-color;
}
.MuiMenuItem-root:hover {
background-color: rgb(240, 240, 240);
}
}

// Main styles and reusable classes
.main {
height: 100%;
Expand Down

0 comments on commit f0cc4df

Please sign in to comment.