File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
apps/material-react-table-docs/components/mdx Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ export const InstallCommand = ({
31
31
className = "language-bash"
32
32
margin = "0"
33
33
style = { { overflowX : 'hidden' } }
34
+ paperSxProps = { {
35
+ '& .token-line' : {
36
+ overflowX : 'auto' ,
37
+ } ,
38
+ } }
34
39
>
35
40
{ tab === 'npm'
36
41
? `npm i ${ packagesString } `
Original file line number Diff line number Diff line change 6
6
styled ,
7
7
alpha ,
8
8
Paper ,
9
+ type SxProps ,
10
+ type Theme ,
9
11
} from '@mui/material' ;
10
12
import { Highlight , themes } from 'prism-react-renderer' ;
11
13
import ContentCopyIcon from '@mui/icons-material/ContentCopy' ;
@@ -23,9 +25,10 @@ interface Props {
23
25
enableCopyButton ?: boolean ;
24
26
style ?: CSSProperties ;
25
27
margin ?: string ;
28
+ paperSxProps ?: SxProps < Theme > ;
26
29
}
27
30
28
- export const SampleCodeSnippet = ( props : Props ) => {
31
+ export const SampleCodeSnippet = ( { paperSxProps , ... props } : Props ) => {
29
32
const theme = useTheme ( ) ;
30
33
const [ isCopied , setIsCopied ] = useState ( false ) ;
31
34
@@ -66,6 +69,7 @@ export const SampleCodeSnippet = (props: Props) => {
66
69
boxShadow : props . enableCopyButton === false ? 'none' : undefined ,
67
70
backgroundImage : 'none' ,
68
71
backgroundColor : 'transparent' ,
72
+ ...paperSxProps ,
69
73
} }
70
74
>
71
75
< Highlight
You can’t perform that action at this time.
0 commit comments