1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-14 17:30:05 +00:00

feat(log): added logComponent and LogTabWithIcons

This commit is contained in:
Yury Shkoda
2023-04-10 16:21:32 +03:00
parent 7c1c1e2410
commit 3a887dec55
3 changed files with 185 additions and 11 deletions

View File

@@ -0,0 +1,32 @@
import { ErrorOutline, Warning } from '@mui/icons-material'
import { LogObject } from '../../../../../utils'
interface LogTabProps {
log: LogObject
}
const LogTabWithIcons = (props: LogTabProps) => {
const { errors, warnings } = props.log
return (
<div
style={{
display: 'flex',
flexDirection: 'row',
gap: 6,
alignItems: 'center'
}}
onClick={() => {
const logWrapper = document.querySelector(`#logWrapper`)
if (logWrapper) logWrapper.scrollTop = 0
}}
>
<span>log</span>
{errors.length && <ErrorOutline color="error" style={{ fontSize: 20 }} />}
{warnings.length && <Warning style={{ fontSize: 20 }} />}{' '}
</div>
)
}
export default LogTabWithIcons