diff --git a/site/components/Workspace/Workspace.tsx b/site/components/Workspace/Workspace.tsx index 23d9cf07d32d9..f7e22fbef7b49 100644 --- a/site/components/Workspace/Workspace.tsx +++ b/site/components/Workspace/Workspace.tsx @@ -5,19 +5,14 @@ import { makeStyles } from "@material-ui/core/styles" import CloudCircleIcon from "@material-ui/icons/CloudCircle" import Link from "next/link" import React from "react" - +import * as Constants from "./constants" import * as API from "../../api" +import { WorkspaceSection } from "./WorkspaceSection" export interface WorkspaceProps { workspace: API.Workspace } -namespace Constants { - export const TitleIconSize = 48 - export const CardRadius = 8 - export const CardPadding = 20 -} - /** * Workspace is the top-level component for viewing an individual workspace */ @@ -26,7 +21,32 @@ export const Workspace: React.FC = ({ workspace }) => { return (
- +
+ +
+
+ + + + + + + + + +
+
+ +
+ +
+
+
+
+
) } @@ -63,6 +83,18 @@ export const WorkspaceHeroIcon: React.FC = () => { ) } +/** + * Temporary placeholder component until we have the sections implemented + * Can be removed once the Workspace page has all the necessary sections + */ +const Placeholder: React.FC = () => { + return ( +
+ Not yet implemented +
+ ) +} + export const useStyles = makeStyles((theme) => { return { root: { @@ -81,6 +113,15 @@ export const useStyles = makeStyles((theme) => { border: `1px solid ${theme.palette.divider}`, borderRadius: Constants.CardRadius, padding: Constants.CardPadding, + margin: theme.spacing(1), + }, + sidebarContainer: { + display: "flex", + flexDirection: "column", + flex: "0 0 350px", + }, + timelineContainer: { + flex: 1, }, icon: { width: Constants.TitleIconSize, diff --git a/site/components/Workspace/WorkspaceSection.tsx b/site/components/Workspace/WorkspaceSection.tsx new file mode 100644 index 0000000000000..57192b8daf82e --- /dev/null +++ b/site/components/Workspace/WorkspaceSection.tsx @@ -0,0 +1,48 @@ +import Paper from "@material-ui/core/Paper" +import { makeStyles } from "@material-ui/core/styles" +import Typography from "@material-ui/core/Typography" +import React from "react" +import { CardPadding, CardRadius } from "./constants" + +export interface WorkspaceSectionProps { + title: string +} + +export const WorkspaceSection: React.FC = ({ title, children }) => { + const styles = useStyles() + + return ( + +
+
+ {title} +
+
+ +
{children}
+
+ ) +} + +const useStyles = makeStyles((theme) => ({ + root: { + border: `1px solid ${theme.palette.divider}`, + borderRadius: CardRadius, + margin: theme.spacing(1), + }, + headerContainer: { + borderBottom: `1px solid ${theme.palette.divider}`, + }, + contents: { + margin: theme.spacing(2), + }, + header: { + alignItems: "center", + display: "flex", + flexDirection: "row", + marginBottom: theme.spacing(1), + marginTop: theme.spacing(1), + paddingLeft: CardPadding + theme.spacing(1), + paddingRight: CardPadding / 2, + }, +})) diff --git a/site/components/Workspace/constants.ts b/site/components/Workspace/constants.ts new file mode 100644 index 0000000000000..44919f96f5399 --- /dev/null +++ b/site/components/Workspace/constants.ts @@ -0,0 +1,3 @@ +export const TitleIconSize = 48 +export const CardRadius = 8 +export const CardPadding = 20