Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4e259e

Browse files
fix: Page header width in the workspace page (#2125)
1 parent3752f4c commita4e259e

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

‎site/src/components/PageHeader/PageHeader.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
import{makeStyles}from"@material-ui/core/styles"
2+
import{combineClasses}from"../../util/combineClasses"
23
import{Stack}from"../Stack/Stack"
34

45
exportinterfacePageHeaderProps{
56
actions?:JSX.Element
7+
className?:string
68
}
79

8-
exportconstPageHeader:React.FC<PageHeaderProps>=({ children, actions})=>{
10+
exportconstPageHeader:React.FC<PageHeaderProps>=({ children, actions, className})=>{
911
conststyles=useStyles()
1012

1113
return(
12-
<divclassName={styles.root}>
14+
<divclassName={combineClasses([styles.root,className])}>
1315
<hgroup>{children}</hgroup>
1416
<Stackdirection="row"className={styles.actions}>
1517
{actions}

‎site/src/components/Workspace/Workspace.tsx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import{makeStyles}from"@material-ui/core/styles"
22
import{FC}from"react"
33
import*asTypesGenfrom"../../api/typesGenerated"
4-
import{MONOSPACE_FONT_FAMILY}from"../../theme/constants"
54
import{BuildsTable}from"../BuildsTable/BuildsTable"
65
import{Margins}from"../Margins/Margins"
76
import{PageHeader,PageHeaderSubtitle,PageHeaderTitle}from"../PageHeader/PageHeader"
@@ -49,6 +48,7 @@ export const Workspace: FC<WorkspaceProps> = ({
4948
return(
5049
<Margins>
5150
<PageHeader
51+
className={styles.header}
5252
actions={
5353
<WorkspaceActions
5454
workspace={workspace}
@@ -89,29 +89,19 @@ export const Workspace: FC<WorkspaceProps> = ({
8989
)
9090
}
9191

92+
constspacerWidth=300
93+
9294
exportconstuseStyles=makeStyles((theme)=>{
9395
return{
9496
firstColumnSpacer:{
9597
flex:2,
9698
},
9799
secondColumnSpacer:{
98-
flex:"0 0300px",
100+
flex:`0 0${spacerWidth}px`,
99101
},
100102
header:{
101-
paddingTop:theme.spacing(5),
102-
paddingBottom:theme.spacing(5),
103-
fontFamily:MONOSPACE_FONT_FAMILY,
104-
display:"flex",
105-
alignItems:"center",
106-
justifyContent:"space-between",
107-
},
108-
title:{
109-
fontWeight:600,
110-
fontFamily:"inherit",
111-
},
112-
subtitle:{
113-
fontFamily:"inherit",
114-
marginTop:theme.spacing(0.5),
103+
// 100% - (the size of sidebar + the space between both )
104+
maxWidth:`calc(100% - (${spacerWidth}px +${theme.spacing(3)}px))`,
115105
},
116106
layout:{
117107
alignItems:"flex-start",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp