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

chore(log): used css module to declare classes

This commit is contained in:
Yury Shkoda
2023-04-27 17:52:57 +03:00
parent 777b3a55be
commit 87e9172cfc
9 changed files with 856 additions and 297 deletions

View File

@@ -6,6 +6,7 @@ import {
clearErrorsAndWarningsHtmlWrapping
} from '../../../../../utils'
import Tooltip from '@mui/material/Tooltip'
import classes from './log.module.css'
interface LogTabProps {
log: LogObject
@@ -15,28 +16,23 @@ const LogTabWithIcons = (props: LogTabProps) => {
const { errors, warnings, body } = props.log
return (
<div
style={{
display: 'flex',
flexDirection: 'row',
gap: 6,
alignItems: 'center'
}}
>
<div className={classes.TabContainer}>
<span>log</span>
{errors && errors.length !== 0 && (
<ErrorOutline color="error" style={{ fontSize: 20 }} />
<ErrorOutline color="error" className={classes.Icon} />
)}
{warnings && warnings.length !== 0 && (
<Warning style={{ fontSize: 20, color: 'green' }} />
)}{' '}
<Warning className={[classes.Icon, classes.GreenIcon].join(' ')} />
)}
<Tooltip
title="Download entire log"
onClick={(evt) => {
download(evt, clearErrorsAndWarningsHtmlWrapping(body))
}}
>
<FileDownloadIcon style={{ fontSize: 20, marginLeft: 20 }} />
<FileDownloadIcon
className={[classes.Icon, classes.TabDownloadIcon].join(' ')}
/>
</Tooltip>
</div>
)