refactor(web): remove typescript

This commit is contained in:
Ali BARIN
2024-02-27 15:23:23 +00:00
parent 636870a075
commit b3ae2d2748
337 changed files with 2067 additions and 4997 deletions

View File

@@ -3,25 +3,13 @@ import ExpandLessIcon from '@mui/icons-material/ExpandLess';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import ErrorIcon from '@mui/icons-material/Error';
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
import { ListItemButton, Typography } from './style';
type FlowSubstepTitleProps = {
expanded?: boolean;
onClick: () => void;
title: string;
valid?: boolean | null;
};
const validIcon = <CheckCircleIcon color="success" />;
const errorIcon = <ErrorIcon color="error" />;
function FlowSubstepTitle(props: FlowSubstepTitleProps): React.ReactElement {
function FlowSubstepTitle(props) {
const { expanded = false, onClick = () => null, valid = null, title } = props;
const hasValidation = valid !== null;
const validationStatusIcon = valid ? validIcon : errorIcon;
return (
<ListItemButton onClick={onClick} selected={expanded} divider>
<Typography variant="body2">
@@ -33,5 +21,4 @@ function FlowSubstepTitle(props: FlowSubstepTitleProps): React.ReactElement {
</ListItemButton>
);
}
export default FlowSubstepTitle;

View File

@@ -1,11 +1,9 @@
import { styled } from '@mui/material/styles';
import MuiListItemButton from '@mui/material/ListItemButton';
import MuiTypography from '@mui/material/Typography';
export const ListItemButton = styled(MuiListItemButton)`
justify-content: space-between;
`;
export const Typography = styled(MuiTypography)`
display: flex;
align-items: center;