Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions docs/src/components/animation/FlashCode.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import * as React from 'react';
import { styled, alpha, SxProps } from '@mui/material/styles';
import { shouldForwardProp } from '@mui/system';

const FlashCodeRoot = styled('div', {
shouldForwardProp: (prop) =>
shouldForwardProp(prop) && prop !== 'endLine' && prop !== 'startLine' && prop !== 'lineHeight',
})<{ endLine?: number; startLine?: number; lineHeight?: number | string }>(({ theme }) => ({
const FlashCodeRoot = styled('div')(({ theme }) => ({
borderRadius: 2,
pointerEvents: 'none',
position: 'absolute',
Expand Down Expand Up @@ -36,16 +32,13 @@ const FlashCode = React.forwardRef(function FlashCode(
return (
<FlashCodeRoot
ref={ref}
endLine={endLine}
startLine={startLine}
lineHeight={lineHeight}
{...other}
style={{
...({
...{
'--Flashcode-lineHeight': lineHeight,
'--Flashcode-startLine': startLine,
'--Flashcode-endLine': endLine,
} as any),
},
...other.style,
}}
>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/productMaterial/MaterialStyling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default function MaterialStyling() {
overflow: 'auto',
}}
>
<Box sx={{ position: 'relative' }}>
<Box sx={{ position: 'relative', display: 'inline-block', minWidth: '100%' }}>
<HighlightedCode copyButtonHidden plainStyle code={code} language="jsx" />
<FlashCode startLine={startLine[index]} endLine={endLine[index]} />
</Box>
Expand Down