mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Pass styles to LogLineMessage
This commit is contained in:
parent
ce0d232946
commit
d3c963ddb3
@ -136,7 +136,11 @@ export const InfiniteScroll = ({
|
||||
({ index, style }: ListChildComponentProps) => {
|
||||
if (!logs[index] && infiniteLoaderState !== 'idle') {
|
||||
return (
|
||||
<LogLineMessage style={style} onClick={infiniteLoaderState === 'pre-scroll' ? onLoadMore : undefined}>
|
||||
<LogLineMessage
|
||||
style={style}
|
||||
styles={styles}
|
||||
onClick={infiniteLoaderState === 'pre-scroll' ? onLoadMore : undefined}
|
||||
>
|
||||
{getMessageFromInfiniteLoaderState(infiniteLoaderState, sortOrder)}
|
||||
</LogLineMessage>
|
||||
);
|
||||
@ -155,7 +159,17 @@ export const InfiniteScroll = ({
|
||||
/>
|
||||
);
|
||||
},
|
||||
[displayedFields, handleOverflow, infiniteLoaderState, logs, onLoadMore, showTime, sortOrder, styles, wrapLogMessage]
|
||||
[
|
||||
displayedFields,
|
||||
handleOverflow,
|
||||
infiniteLoaderState,
|
||||
logs,
|
||||
onLoadMore,
|
||||
showTime,
|
||||
sortOrder,
|
||||
styles,
|
||||
wrapLogMessage,
|
||||
]
|
||||
);
|
||||
|
||||
const onItemsRendered = useCallback(
|
||||
|
@ -1,18 +1,15 @@
|
||||
import { CSSProperties, ReactNode } from 'react';
|
||||
|
||||
import { useTheme2 } from '@grafana/ui';
|
||||
|
||||
import { getStyles } from './LogLine';
|
||||
import { LogLineStyles } from './LogLine';
|
||||
|
||||
interface Props {
|
||||
children: ReactNode;
|
||||
onClick?: () => void;
|
||||
style: CSSProperties;
|
||||
styles: LogLineStyles;
|
||||
}
|
||||
|
||||
export const LogLineMessage = ({ children, onClick, style }: Props) => {
|
||||
const theme = useTheme2();
|
||||
const styles = getStyles(theme);
|
||||
export const LogLineMessage = ({ children, onClick, style, styles }: Props) => {
|
||||
return (
|
||||
<div style={style} className={`${styles.logLine} ${styles.logLineMessage}`}>
|
||||
{onClick ? (
|
||||
|
Loading…
Reference in New Issue
Block a user