feat: add margins to pages (#1217)

* Add Margin, use constants

* Change throughout

* Add to a page, lint

* Format
This commit is contained in:
Presley Pizzo
2022-05-04 11:36:54 -04:00
committed by GitHub
parent 4c35b8174a
commit 34b91fd577
13 changed files with 91 additions and 83 deletions

View File

@ -1,8 +1,8 @@
import Paper from "@material-ui/core/Paper"
import { makeStyles } from "@material-ui/core/styles"
import React from "react"
import { UserResponse } from "../../api/types"
import { Header } from "../../components/Header/Header"
import { Margins } from "../../components/Margins/Margins"
import { Stack } from "../../components/Stack/Stack"
import { UsersTable } from "../../components/UsersTable/UsersTable"
export const Language = {
@ -16,21 +16,12 @@ export interface UsersPageViewProps {
}
export const UsersPageView: React.FC<UsersPageViewProps> = ({ users, openUserCreationDialog }) => {
const styles = useStyles()
return (
<div className={styles.flexColumn}>
<Stack spacing={4}>
<Header title={Language.pageTitle} action={{ text: Language.newUserButton, onClick: openUserCreationDialog }} />
<Paper style={{ maxWidth: "1380px", margin: "1em auto", width: "100%" }}>
<Margins>
<UsersTable users={users} />
</Paper>
</div>
</Margins>
</Stack>
)
}
const useStyles = makeStyles(() => ({
flexColumn: {
display: "flex",
flexDirection: "column",
},
}))