Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8f28843

Browse files
committedOct 9, 2023
emotion: Margins
1 parent ae5c50d commit 8f28843

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed
 
Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { makeStyles } from "@mui/styles";
2-
import { FC } from "react";
3-
import { combineClasses } from "utils/combineClasses";
1+
import { type FC } from "react";
42
import {
53
containerWidth,
64
containerWidthMedium,
@@ -15,24 +13,20 @@ const widthBySize: Record<Size, number> = {
1513
small: containerWidth / 3,
1614
};
1715

18-
const useStyles = makeStyles(() => ({
19-
margins: {
20-
margin: "0 auto",
21-
maxWidth: ({ maxWidth }: { maxWidth: number }) => maxWidth,
22-
padding: `0 ${sidePadding}px`,
23-
width: "100%",
24-
},
25-
}));
26-
2716
export const Margins: FC<JSX.IntrinsicElements["div"] & { size?: Size }> = ({
2817
size = "regular",
2918
...divProps
3019
}) => {
31-
const styles = useStyles({ maxWidth: widthBySize[size] });
20+
const maxWidth = widthBySize[size];
3221
return (
3322
<div
3423
{...divProps}
35-
className={combineClasses([styles.margins, divProps.className])}
24+
css={{
25+
margin: "0 auto",
26+
maxWidth: maxWidth,
27+
padding: `0 ${sidePadding}px`,
28+
width: "100%",
29+
}}
3630
/>
3731
);
3832
};

0 commit comments

Comments
 (0)
Failed to load comments.