Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 1 addition & 17 deletions site/src/components/TableHeaders/TableHeaders.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { makeStyles } from "@material-ui/core/styles"
import TableCell from "@material-ui/core/TableCell"
import TableRow from "@material-ui/core/TableRow"
import { FC } from "react"
Expand All @@ -9,8 +8,7 @@ export interface TableHeadersProps {
}

export const TableHeaderRow: FC = ({ children }) => {
const styles = useStyles()
return <TableRow className={styles.root}>{children}</TableRow>
return <TableRow>{children}</TableRow>
}

export const TableHeaders: FC<TableHeadersProps> = ({ columns, hasMenu }) => {
Expand All @@ -26,17 +24,3 @@ export const TableHeaders: FC<TableHeadersProps> = ({ columns, hasMenu }) => {
</TableHeaderRow>
)
}

export const useStyles = makeStyles((theme) => ({
root: {
fontSize: 12,
fontWeight: 500,
lineHeight: "16px",
letterSpacing: 1.5,
textTransform: "uppercase",
paddingTop: theme.spacing(1),
paddingBottom: theme.spacing(1),
color: theme.palette.text.secondary,
backgroundColor: theme.palette.background.default,
},
}))
21 changes: 14 additions & 7 deletions site/src/theme/overrides.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Theme } from "@material-ui/core/styles"
import { SimplePaletteColorOptions } from "@material-ui/core/styles/createPalette"
import { Overrides } from "@material-ui/core/styles/overrides"
import { colors } from "./colors"
import { borderRadius, MONOSPACE_FONT_FAMILY } from "./constants"

export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
return {
MuiCssBaseline: {
"@global": {
body: {
backgroundImage:
"linear-gradient(to right bottom, hsl(223, 38%, 14%), hsl(221, 53%, 3%))",
backgroundImage: `linear-gradient(to right bottom, ${colors.gray[15]}, ${colors.gray[17]})`,
backgroundRepeat: "no-repeat",
backgroundAttachment: "fixed",
letterSpacing: "-0.015em",
Expand Down Expand Up @@ -40,7 +40,7 @@ export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
contained: {
boxShadow: "none",
color: palette.text.primary,
backgroundColor: "hsl(223, 27%, 3%)",
backgroundColor: colors.gray[17],
"&:hover": {
boxShadow: "none",
backgroundColor: "#000000",
Expand Down Expand Up @@ -68,8 +68,8 @@ export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
},
MuiTableHead: {
root: {
display: "table-header-group",
fontFamily: MONOSPACE_FONT_FAMILY,
textTransform: "uppercase",
},
},
MuiTableContainer: {
Expand All @@ -80,7 +80,11 @@ export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
},
MuiTable: {
root: {
background: "hsla(222, 31%, 19%, .5)",
borderCollapse: "collapse",
border: "none",
background: colors.gray[15],
boxShadow: `0 0 0 1px ${colors.gray[15]} inset`,
overflow: "hidden",

"& td": {
paddingTop: 16,
Expand All @@ -95,16 +99,19 @@ export const getOverrides = ({ palette, breakpoints }: Theme): Overrides => {
},
},
},

MuiTableCell: {
head: {
color: palette.text.secondary,
fontSize: 14,
color: colors.gray[5],
fontWeight: 600,
},
root: {
fontFamily: MONOSPACE_FONT_FAMILY,
fontSize: 16,
background: palette.background.paper,
borderBottom: `1px solid ${palette.divider}`,
padding: 8,
padding: "12px 8px",
// This targets the first+last td elements, and also the first+last elements
// of a TableCellLink.
"&:not(:only-child):first-child, &:not(:only-child):first-child > a": {
Expand Down