core-components: LogViewer prop className -> classes
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -647,7 +647,9 @@ export type LogViewerClassKey =
|
||||
|
||||
// @public
|
||||
export interface LogViewerProps {
|
||||
className?: string;
|
||||
classes?: {
|
||||
root?: string;
|
||||
};
|
||||
text: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +34,11 @@ export interface LogViewerProps {
|
||||
*/
|
||||
text: string;
|
||||
/**
|
||||
* The className to apply to the root LogViewer element inside the auto sizer.
|
||||
* Styling overrides for classes within the LogViewer component.
|
||||
*/
|
||||
className?: string;
|
||||
classes?: {
|
||||
root?: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,11 +29,11 @@ import { useLogViewerSelection } from './useLogViewerSelection';
|
||||
|
||||
export interface RealLogViewerProps {
|
||||
text: string;
|
||||
className?: string;
|
||||
classes?: { root?: string };
|
||||
}
|
||||
|
||||
export function RealLogViewer(props: RealLogViewerProps) {
|
||||
const classes = useStyles();
|
||||
const classes = useStyles({ classes: props.classes });
|
||||
const listRef = useRef<FixedSizeList | null>(null);
|
||||
|
||||
// The processor keeps state that optimizes appending to the text
|
||||
@@ -60,10 +60,7 @@ export function RealLogViewer(props: RealLogViewerProps) {
|
||||
return (
|
||||
<AutoSizer>
|
||||
{({ height, width }) => (
|
||||
<div
|
||||
style={{ width, height }}
|
||||
className={classnames(classes.root, props.className)}
|
||||
>
|
||||
<div style={{ width, height }} className={classes.root}>
|
||||
<div className={classes.header}>
|
||||
<LogViewerControls {...search} />
|
||||
</div>
|
||||
|
||||
@@ -133,7 +133,7 @@ export const WorkflowRunLogs = ({
|
||||
<div className={classes.modalLogContainer}>
|
||||
<LogViewer
|
||||
text={logText ?? 'No Values Found'}
|
||||
className={classes.log}
|
||||
classes={{ root: classes.log }}
|
||||
/>
|
||||
</div>
|
||||
</Fade>
|
||||
@@ -141,7 +141,7 @@ export const WorkflowRunLogs = ({
|
||||
</AccordionSummary>
|
||||
{logText && (
|
||||
<div className={classes.normalLogContainer}>
|
||||
<LogViewer text={logText} className={classes.log} />
|
||||
<LogViewer text={logText} classes={{ root: classes.log }} />
|
||||
</div>
|
||||
)}
|
||||
</Accordion>
|
||||
|
||||
@@ -86,7 +86,7 @@ export const TechDocsBuildLogsDrawerContent = ({
|
||||
<Close />
|
||||
</IconButton>
|
||||
</Grid>
|
||||
<LogViewer text={logText} className={classes.logs} />
|
||||
<LogViewer text={logText} classes={{ root: classes.logs }} />
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user