@@ -59,6 +59,31 @@ export const Heading = ({ level, children, component }) => {
59
59
) ;
60
60
} ;
61
61
62
+ const tableStyles = makeStyles ( ( theme ) => ( {
63
+ table : {
64
+ [ theme . breakpoints . down ( 'sm' ) ] : {
65
+ tableLayout : 'fixed'
66
+ }
67
+ } ,
68
+ cell : {
69
+ [ theme . breakpoints . down ( 'sm' ) ] : {
70
+ overflow : 'overlay'
71
+ }
72
+ }
73
+ } ) ) ;
74
+
75
+ const StyledCell = ( props ) => {
76
+ const { cell } = tableStyles ( ) ;
77
+
78
+ return < TableCell { ...props } className = { cell } /> ;
79
+ } ;
80
+
81
+ const StyledTable = ( props ) => {
82
+ const { table } = tableStyles ( ) ;
83
+
84
+ return < Table { ...props } className = { table } /> ;
85
+ } ;
86
+
62
87
const MdLink = ( { href, children } ) => {
63
88
const classes = useHeadingStyles ( ) ;
64
89
return href . startsWith ( '/' ) ? (
@@ -94,15 +119,15 @@ const MdxComponents = {
94
119
) ,
95
120
table : ( { children } ) => (
96
121
< Paper style = { { marginBottom : 10 , marginTop : 10 } } className = "DocTable" >
97
- < Table >
122
+ < StyledTable >
98
123
< TableHead > { children [ 0 ] . props . children } </ TableHead >
99
124
< TableBody > { children [ 1 ] . props . children } </ TableBody >
100
- </ Table >
125
+ </ StyledTable >
101
126
</ Paper >
102
127
) ,
103
128
tr : ( { children } ) => < TableRow > { children } </ TableRow > ,
104
- td : ( { children } ) => < TableCell > { children } </ TableCell > ,
105
- th : ( { children } ) => < TableCell > { children } </ TableCell > ,
129
+ td : ( { children } ) => < StyledCell > { children } </ StyledCell > ,
130
+ th : ( { children } ) => < StyledCell > { children } </ StyledCell > ,
106
131
inlineCode : ( { children } ) => (
107
132
< code style = { { background : 'white' , borderRadius : 3 , fontFamily : 'courier, monospace' , padding : '3px' } } > { children } </ code >
108
133
)
0 commit comments