change(tracker): change multiview tab color
This commit is contained in:
parent
66a167eab5
commit
ca5381850a
3 changed files with 10 additions and 7 deletions
|
|
@ -11,12 +11,14 @@ interface ITab {
|
|||
onClick?: () => void;
|
||||
classNames?: string;
|
||||
children: React.ReactNode;
|
||||
style?: Record<string, any>;
|
||||
}
|
||||
|
||||
const Tab = (props: ITab) => (
|
||||
<div
|
||||
onClick={props.onClick}
|
||||
className={cn('p-1 rounded flex items-center justify-center cursor-pointer', props.classNames)}
|
||||
style={props.style}
|
||||
>
|
||||
{props.children}
|
||||
</div>
|
||||
|
|
@ -29,7 +31,7 @@ export const InactiveTab = React.memo((props: Omit<ITab, 'children'>) => (
|
|||
));
|
||||
|
||||
const ActiveTab = React.memo((props: Omit<ITab, 'children'>) => (
|
||||
<Tab onClick={props.onClick} classNames="hover:bg-teal bg-borderColor-primary">
|
||||
<Tab onClick={props.onClick} classNames="hover:bg-teal" style={{ background: 'rgba(57, 78, 255, 0.5)' }}>
|
||||
<Icon name="play-fill-new" size="22" color="white" />
|
||||
</Tab>
|
||||
));
|
||||
|
|
|
|||
|
|
@ -11,12 +11,14 @@ interface ITab {
|
|||
onClick?: () => void;
|
||||
classNames?: string;
|
||||
children: React.ReactNode;
|
||||
style?: Record<string, any>;
|
||||
}
|
||||
|
||||
const Tab = (props: ITab) => (
|
||||
<div
|
||||
onClick={props.onClick}
|
||||
className={cn('p-1 rounded flex items-center justify-center cursor-pointer', props.classNames)}
|
||||
style={props.style}
|
||||
>
|
||||
{props.children}
|
||||
</div>
|
||||
|
|
@ -29,7 +31,7 @@ export const InactiveTab = React.memo((props: Omit<ITab, 'children'>) => (
|
|||
));
|
||||
|
||||
const ActiveTab = React.memo((props: Omit<ITab, 'children'>) => (
|
||||
<Tab onClick={props.onClick} classNames="hover:bg-teal bg-borderColor-primary">
|
||||
<Tab onClick={props.onClick} classNames="hover:bg-teal" style={{ background: 'rgba(57, 78, 255, 0.5)' }}>
|
||||
<Icon name="play-fill-new" size="22" color="white" />
|
||||
</Tab>
|
||||
));
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ function ConsolePanel() {
|
|||
timeoutStartAutoscroll()
|
||||
}
|
||||
|
||||
const _list = useRef(); // TODO: fix react-virtualized types & incapsulate scrollToRow logic
|
||||
const _list = useRef(null); // TODO: fix react-virtualized types & incapsulate scrollToRow logic
|
||||
useEffect(() => {
|
||||
if (_list.current) {
|
||||
// @ts-ignore
|
||||
|
|
@ -130,8 +130,7 @@ function ConsolePanel() {
|
|||
const item = filteredList[index];
|
||||
|
||||
return (
|
||||
<React.Fragment key={key}>
|
||||
{/* @ts-ignore */}
|
||||
// @ts-ignore
|
||||
<CellMeasurer cache={cache} columnIndex={0} key={key} rowIndex={index} parent={parent}>
|
||||
{({ measure }: any) => (
|
||||
<ConsoleRow
|
||||
|
|
@ -142,13 +141,12 @@ function ConsolePanel() {
|
|||
renderWithNL={renderWithNL}
|
||||
onClick={() => showDetails(item)}
|
||||
recalcHeight={() => {
|
||||
measure();
|
||||
(_list as any).current.recomputeRowHeights(index);
|
||||
cache.clear(index, 0)
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</CellMeasurer>
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -195,6 +193,7 @@ function ConsolePanel() {
|
|||
ref={_list}
|
||||
deferredMeasurementCache={cache}
|
||||
overscanRowCount={5}
|
||||
estimatedRowSize={36}
|
||||
rowCount={Math.ceil(filteredList.length || 1)}
|
||||
rowHeight={cache.rowHeight}
|
||||
rowRenderer={_rowRenderer}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue