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 = ({
3131 className = "language-bash"
3232 margin = "0"
3333 style = { { overflowX : 'hidden' } }
34+ paperSxProps = { {
35+ '& .token-line' : {
36+ overflowX : 'auto' ,
37+ } ,
38+ } }
3439 >
3540 { tab === 'npm'
3641 ? `npm i ${ packagesString } `
Original file line number Diff line number Diff line change 66 styled ,
77 alpha ,
88 Paper ,
9+ type SxProps ,
10+ type Theme ,
911} from '@mui/material' ;
1012import { Highlight , themes } from 'prism-react-renderer' ;
1113import ContentCopyIcon from '@mui/icons-material/ContentCopy' ;
@@ -23,9 +25,10 @@ interface Props {
2325 enableCopyButton ?: boolean ;
2426 style ?: CSSProperties ;
2527 margin ?: string ;
28+ paperSxProps ?: SxProps < Theme > ;
2629}
2730
28- export const SampleCodeSnippet = ( props : Props ) => {
31+ export const SampleCodeSnippet = ( { paperSxProps , ... props } : Props ) => {
2932 const theme = useTheme ( ) ;
3033 const [ isCopied , setIsCopied ] = useState ( false ) ;
3134
@@ -66,6 +69,7 @@ export const SampleCodeSnippet = (props: Props) => {
6669 boxShadow : props . enableCopyButton === false ? 'none' : undefined ,
6770 backgroundImage : 'none' ,
6871 backgroundColor : 'transparent' ,
72+ ...paperSxProps ,
6973 } }
7074 >
7175 < Highlight
You can’t perform that action at this time.
0 commit comments