fix: resolve style not passing in <LogLine /> (#24111)

This pull-request resolves an regression where the spread was overriding
the required styles from the `react-window` virtualised rows. This was
causing the scroll to act a little crazy.
This commit is contained in:
Jake Howell
2026-04-08 03:54:16 +10:00
committed by GitHub
parent f3f0a2c553
commit 655d647d40
+10 -2
View File
@@ -16,7 +16,12 @@ type LogLineProps = {
level: LogLevel;
} & HTMLAttributes<HTMLPreElement>;
export const LogLine: FC<LogLineProps> = ({ level, className, ...props }) => {
export const LogLine: FC<LogLineProps> = ({
level,
className,
style,
...props
}) => {
return (
<pre
{...props}
@@ -33,7 +38,10 @@ export const LogLine: FC<LogLineProps> = ({ level, className, ...props }) => {
className,
)}
style={{
padding: `0 var(--log-line-side-padding, ${DEFAULT_LOG_LINE_SIDE_PADDING}px)`,
...style,
padding:
style?.padding ??
`0 var(--log-line-side-padding, ${DEFAULT_LOG_LINE_SIDE_PADDING}px)`,
}}
/>
);