File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
site/src/components/Margins Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change 1
- import { makeStyles } from "@mui/styles" ;
2
- import { FC } from "react" ;
3
- import { combineClasses } from "utils/combineClasses" ;
1
+ import { type FC } from "react" ;
4
2
import {
5
3
containerWidth ,
6
4
containerWidthMedium ,
@@ -15,24 +13,20 @@ const widthBySize: Record<Size, number> = {
15
13
small : containerWidth / 3 ,
16
14
} ;
17
15
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
-
27
16
export const Margins : FC < JSX . IntrinsicElements [ "div" ] & { size ?: Size } > = ( {
28
17
size = "regular" ,
29
18
...divProps
30
19
} ) => {
31
- const styles = useStyles ( { maxWidth : widthBySize [ size ] } ) ;
20
+ const maxWidth = widthBySize [ size ] ;
32
21
return (
33
22
< div
34
23
{ ...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
+ } }
36
30
/>
37
31
) ;
38
32
} ;
You can’t perform that action at this time.
0 commit comments