Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,9 @@ CannotEdit.args = {
},
canUpdateWorkspace: false,
}

export const SmallViewport = Template.bind({})
SmallViewport.args = WorkspaceOffShort.args
SmallViewport.parameters = {
chromatic: { viewports: [320] },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks useful, how does it work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We basically are saying to chromatic to test this snapshot using the 320px viewport. Unfortunately, looks like a Chromatic thing not a Storybook native option.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like maybe Chromatic isn't registering this one?

}
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ const useStyles = makeStyles((theme) => ({
alignItems: "center",
border: `1px solid ${theme.palette.divider}`,
borderRadius: `${theme.shape.borderRadius}px`,

[theme.breakpoints.down("sm")]: {
flexDirection: "column",
},
},
label: {
borderRight: 0,
Expand All @@ -150,6 +154,7 @@ const useStyles = makeStyles((theme) => ({
width: "100%",
display: "flex",
alignItems: "center",
padding: theme.spacing(1, 2),
},
},
actions: {
Expand All @@ -162,6 +167,13 @@ const useStyles = makeStyles((theme) => ({
borderLeft: `1px solid ${theme.palette.divider}`,
borderRadius: `0px ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px 0px`,
flexShrink: 0,

[theme.breakpoints.down("sm")]: {
width: "100%",
borderLeft: 0,
borderTop: `1px solid ${theme.palette.divider}`,
borderRadius: `0 0 ${theme.shape.borderRadius}px ${theme.shape.borderRadius}px`,
},
},
iconButton: {
borderRadius: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export const WorkspaceScheduleLabel: React.FC<{ workspace: Workspace }> = ({ wor
const useStyles = makeStyles((theme) => ({
labelText: {
marginRight: theme.spacing(2),

[theme.breakpoints.down("sm")]: {
marginRight: 0,
},
},

labelStrong: {
Expand Down