Skip to content

Commit

Permalink
fix: center the div
Browse files Browse the repository at this point in the history
  • Loading branch information
lewxdev committed Jul 22, 2024
1 parent c71b16a commit ec38fa4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/components/field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function Field() {

return (
<div
className="grid select-none bg-white"
className="grid max-h-full max-w-full select-none overflow-auto bg-white"
onContextMenu={(event) => event.preventDefault()}
style={{
gap: `${GRID_SIZE * 0.125}rem`,
Expand Down
6 changes: 5 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export const metadata: Metadata = {
export default function RootLayout(props: Readonly<React.PropsWithChildren>) {
return (
<html lang="en">
<body className={GeistSans.className}>{props.children}</body>
<body className={GeistSans.className}>
<div className="flex h-screen items-center justify-center">
{props.children}
</div>
</body>
</html>
);
}
6 changes: 1 addition & 5 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { Field } from "@/components/field";

export default function App() {
return (
<div className="flex h-screen items-center justify-center">
<Field />
</div>
);
return <Field />;
}

0 comments on commit ec38fa4

Please sign in to comment.