Skip to content

Commit a350859

Browse files
committed
Use variables instead of hard values
1 parent e587fe2 commit a350859

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

site/src/components/TabSidebar/TabSidebar.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import ListItem from "@material-ui/core/ListItem"
33
import { makeStyles } from "@material-ui/core/styles"
44
import { FC } from "react"
55
import { NavLink } from "react-router-dom"
6+
import { sidePadding } from "theme/constants"
67
import { combineClasses } from "../../util/combineClasses"
78

89
export interface TabSidebarItem {
@@ -52,11 +53,10 @@ const useStyles = makeStyles((theme) => ({
5253
display: "flex",
5354
borderBottom: `1px solid ${theme.palette.divider}`,
5455
marginBottom: theme.spacing(2),
55-
// 48px is the side margins
56-
width: "calc(100% + 48px)",
57-
// Side margin
58-
marginLeft: -theme.spacing(3),
59-
marginTop: theme.spacing(3),
56+
// Fit all the width
57+
width: `calc(100% + ${sidePadding * 2}px)`,
58+
marginLeft: -sidePadding,
59+
marginTop: sidePadding,
6060
},
6161
},
6262

0 commit comments

Comments
 (0)