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

Commit351d55e

Browse files
chore: Minor table design changes (coder#3494)
1 parent3b951f7 commit351d55e

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import{makeStyles}from"@material-ui/core/styles"
21
importTableCellfrom"@material-ui/core/TableCell"
32
importTableRowfrom"@material-ui/core/TableRow"
43
import{FC}from"react"
@@ -9,8 +8,7 @@ export interface TableHeadersProps {
98
}
109

1110
exportconstTableHeaderRow:FC=({ children})=>{
12-
conststyles=useStyles()
13-
return<TableRowclassName={styles.root}>{children}</TableRow>
11+
return<TableRow>{children}</TableRow>
1412
}
1513

1614
exportconstTableHeaders:FC<TableHeadersProps>=({ columns, hasMenu})=>{
@@ -26,17 +24,3 @@ export const TableHeaders: FC<TableHeadersProps> = ({ columns, hasMenu }) => {
2624
</TableHeaderRow>
2725
)
2826
}
29-
30-
exportconstuseStyles=makeStyles((theme)=>({
31-
root:{
32-
fontSize:12,
33-
fontWeight:500,
34-
lineHeight:"16px",
35-
letterSpacing:1.5,
36-
textTransform:"uppercase",
37-
paddingTop:theme.spacing(1),
38-
paddingBottom:theme.spacing(1),
39-
color:theme.palette.text.secondary,
40-
backgroundColor:theme.palette.background.default,
41-
},
42-
}))

‎site/src/theme/overrides.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import{Theme}from"@material-ui/core/styles"
22
import{SimplePaletteColorOptions}from"@material-ui/core/styles/createPalette"
33
import{Overrides}from"@material-ui/core/styles/overrides"
4+
import{colors}from"./colors"
45
import{borderRadius,MONOSPACE_FONT_FAMILY}from"./constants"
56

67
exportconstgetOverrides=({ palette, breakpoints}:Theme):Overrides=>{
78
return{
89
MuiCssBaseline:{
910
"@global":{
1011
body:{
11-
backgroundImage:
12-
"linear-gradient(to right bottom, hsl(223, 38%, 14%), hsl(221, 53%, 3%))",
12+
backgroundImage:`linear-gradient(to right bottom,${colors.gray[15]},${colors.gray[17]})`,
1313
backgroundRepeat:"no-repeat",
1414
backgroundAttachment:"fixed",
1515
letterSpacing:"-0.015em",
@@ -40,7 +40,7 @@ export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
4040
contained:{
4141
boxShadow:"none",
4242
color:palette.text.primary,
43-
backgroundColor:"hsl(223, 27%, 3%)",
43+
backgroundColor:colors.gray[17],
4444
"&:hover":{
4545
boxShadow:"none",
4646
backgroundColor:"#000000",
@@ -68,8 +68,8 @@ export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
6868
},
6969
MuiTableHead:{
7070
root:{
71+
display:"table-header-group",
7172
fontFamily:MONOSPACE_FONT_FAMILY,
72-
textTransform:"uppercase",
7373
},
7474
},
7575
MuiTableContainer:{
@@ -80,7 +80,11 @@ export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
8080
},
8181
MuiTable:{
8282
root:{
83-
background:"hsla(222, 31%, 19%, .5)",
83+
borderCollapse:"collapse",
84+
border:"none",
85+
background:colors.gray[15],
86+
boxShadow:`0 0 0 1px${colors.gray[15]} inset`,
87+
overflow:"hidden",
8488

8589
"& td":{
8690
paddingTop:16,
@@ -95,16 +99,19 @@ export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
9599
},
96100
},
97101
},
102+
98103
MuiTableCell:{
99104
head:{
100-
color:palette.text.secondary,
105+
fontSize:14,
106+
color:colors.gray[5],
107+
fontWeight:600,
101108
},
102109
root:{
103110
fontFamily:MONOSPACE_FONT_FAMILY,
104111
fontSize:16,
105112
background:palette.background.paper,
106113
borderBottom:`1px solid${palette.divider}`,
107-
padding:8,
114+
padding:"12px 8px",
108115
// This targets the first+last td elements, and also the first+last elements
109116
// of a TableCellLink.
110117
"&:not(:only-child):first-child, &:not(:only-child):first-child > a":{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp