core-components: LogViewer prop className -> classes

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-12-09 12:02:09 +01:00
parent 6ff2055519
commit 85ee184e68
5 changed files with 13 additions and 12 deletions
+3 -1
View File
@@ -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>