- Notifications
You must be signed in to change notification settings - Fork928
feat: WorkspaceSection action#1623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -9,13 +9,11 @@ import { WorkspaceSection } from "../WorkspaceSection/WorkspaceSection" | ||
import { WorkspaceStatusBar } from "../WorkspaceStatusBar/WorkspaceStatusBar" | ||
export interface WorkspaceProps { | ||
handleStart: () => void | ||
handleStop: () => void | ||
handleRetry: () => void | ||
handleUpdate: () => void | ||
workspace: TypesGen.Workspace | ||
Comment on lines -12 to +16 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Review:
| ||
workspaceStatus: WorkspaceStatus | ||
builds?: TypesGen.WorkspaceBuild[] | ||
} | ||
@@ -24,11 +22,11 @@ export interface WorkspaceProps { | ||
* Workspace is the top-level component for viewing an individual workspace | ||
*/ | ||
export const Workspace: React.FC<WorkspaceProps> = ({ | ||
handleStart, | ||
handleStop, | ||
handleRetry, | ||
handleUpdate, | ||
workspace, | ||
workspaceStatus, | ||
builds, | ||
}) => { | ||
@@ -45,19 +43,23 @@ export const Workspace: React.FC<WorkspaceProps> = ({ | ||
handleUpdate={handleUpdate} | ||
workspaceStatus={workspaceStatus} | ||
/> | ||
<div className={styles.horizontal}> | ||
<div className={styles.sidebarContainer}> | ||
<WorkspaceSection title="Applications"> | ||
<Placeholder /> | ||
</WorkspaceSection> | ||
<WorkspaceSchedule workspace={workspace} /> | ||
<WorkspaceSection title="Dev URLs"> | ||
<Placeholder /> | ||
</WorkspaceSection> | ||
<WorkspaceSection title="Resources"> | ||
<Placeholder /> | ||
</WorkspaceSection> | ||
</div> | ||
ContributorAuthor
| ||
<div className={styles.timelineContainer}> | ||
<WorkspaceSection title="Timeline" contentsProps={{ className: styles.timelineContents }}> | ||
<BuildsTable builds={builds} className={styles.timelineTable} /> | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import IconButton from "@material-ui/core/IconButton" | ||
import EditIcon from "@material-ui/icons/Edit" | ||
import { action } from "@storybook/addon-actions" | ||
import { Story } from "@storybook/react" | ||
import React from "react" | ||
import { WorkspaceSection, WorkspaceSectionProps } from "./WorkspaceSection" | ||
export default { | ||
title: "components/WorkspaceSection", | ||
component: WorkspaceSection, | ||
} | ||
const Template: Story<WorkspaceSectionProps> = (args) => <WorkspaceSection {...args}>Content</WorkspaceSection> | ||
export const NoAction = Template.bind({}) | ||
NoAction.args = { | ||
title: "A Workspace Section", | ||
} | ||
export const Action = Template.bind({}) | ||
Action.args = { | ||
action: ( | ||
<IconButton onClick={action("edit")}> | ||
<EditIcon /> | ||
</IconButton> | ||
), | ||
title: "Action Section", | ||
} | ||
ContributorAuthor
|