diff --git a/frontend/src/component/common/PermissionIconButton/PermissionIconButton.tsx b/frontend/src/component/common/PermissionIconButton/PermissionIconButton.tsx
index 2ab1fb443b..f072a5f338 100644
--- a/frontend/src/component/common/PermissionIconButton/PermissionIconButton.tsx
+++ b/frontend/src/component/common/PermissionIconButton/PermissionIconButton.tsx
@@ -29,6 +29,7 @@ interface IPermissionIconButtonProps {
interface IButtonProps extends IPermissionIconButtonProps {
onClick: (event: React.SyntheticEvent) => void;
+ style?: React.CSSProperties;
}
interface ILinkProps extends IPermissionIconButtonProps {
@@ -107,6 +108,7 @@ const PermissionIconButton = (props: IButtonProps | ILinkProps) => {
/>
);
}
+
return ;
};
diff --git a/frontend/src/component/project/Project/ProjectForm/ProjectForm.styles.ts b/frontend/src/component/project/Project/ProjectForm/ProjectForm.styles.ts
index 841f8b071b..d114f7e7a6 100644
--- a/frontend/src/component/project/Project/ProjectForm/ProjectForm.styles.ts
+++ b/frontend/src/component/project/Project/ProjectForm/ProjectForm.styles.ts
@@ -1,39 +1,36 @@
-import { makeStyles } from 'tss-react/mui';
+import Input from 'component/common/Input/Input';
+import { TextField, Button, styled } from '@mui/material';
-export const useStyles = makeStyles()(theme => ({
- form: {
- display: 'flex',
- flexDirection: 'column',
- height: '100%',
- },
- container: {
- maxWidth: '400px',
- },
- input: { width: '100%', marginBottom: '1rem' },
- label: {
- minWidth: '300px',
- [theme.breakpoints.down(600)]: {
- minWidth: 'auto',
- },
- },
- buttonContainer: {
- marginTop: 'auto',
- display: 'flex',
- justifyContent: 'flex-end',
- },
- cancelButton: {
- marginLeft: '1.5rem',
- },
- inputDescription: {
- marginBottom: '0.5rem',
- },
- permissionErrorContainer: {
- position: 'relative',
- },
- errorMessage: {
- fontSize: theme.fontSizes.smallBody,
- color: theme.palette.error.main,
- position: 'absolute',
- top: '-8px',
- },
+export const StyledForm = styled('form')(() => ({
+ display: 'flex',
+ flexDirection: 'column',
+ height: '100%',
+}));
+
+export const StyledContainer = styled('div')(() => ({
+ maxWidth: '400px',
+}));
+
+export const StyledDescription = styled('p')(({ theme }) => ({
+ marginBottom: theme.spacing(1),
+}));
+
+export const StyledInput = styled(Input)(({ theme }) => ({
+ width: '100%',
+ marginBottom: theme.spacing(2),
+}));
+
+export const StyledTextField = styled(TextField)(({ theme }) => ({
+ width: '100%',
+ marginBottom: theme.spacing(2),
+}));
+
+export const StyledButtonContainer = styled('div')(() => ({
+ marginTop: 'auto',
+ display: 'flex',
+ justifyContent: 'flex-end',
+}));
+
+export const StyledButton = styled(Button)(({ theme }) => ({
+ marginLeft: theme.spacing(3),
}));
diff --git a/frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx b/frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx
index 08ed486360..29eb3fcf54 100644
--- a/frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx
+++ b/frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx
@@ -1,9 +1,14 @@
-import Input from 'component/common/Input/Input';
-import { TextField, Button } from '@mui/material';
-import { useStyles } from './ProjectForm.styles';
import React from 'react';
import { trim } from 'component/common/util';
-
+import {
+ StyledForm,
+ StyledContainer,
+ StyledDescription,
+ StyledInput,
+ StyledTextField,
+ StyledButtonContainer,
+ StyledButton,
+} from './ProjectForm.styles';
interface IProjectForm {
projectId: string;
projectName: string;
@@ -34,16 +39,11 @@ const ProjectForm: React.FC = ({
validateProjectId,
clearErrors,
}) => {
- const { classes: styles } = useStyles();
-
return (
-
+ Cancel
+
+
);
};
diff --git a/frontend/src/component/project/Project/ProjectInfo/ProjectInfo.styles.ts b/frontend/src/component/project/Project/ProjectInfo/ProjectInfo.styles.ts
index eda5b42234..94e495114a 100644
--- a/frontend/src/component/project/Project/ProjectInfo/ProjectInfo.styles.ts
+++ b/frontend/src/component/project/Project/ProjectInfo/ProjectInfo.styles.ts
@@ -1,85 +1,83 @@
-import { makeStyles } from 'tss-react/mui';
+import { Link } from 'react-router-dom';
+import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
+import { flexRow } from 'themes/themeStyles';
+import { styled } from '@mui/material';
-export const useStyles = makeStyles()(theme => ({
- projectInfo: {
- width: '225px',
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- boxShadow: 'none',
- [theme.breakpoints.down('md')]: {
- flexDirection: 'row',
- alignItems: 'stretch',
- width: '100%',
- marginBottom: '1rem',
- },
- },
- percentageContainer: {
- display: 'flex',
- justifyContent: 'center',
- margin: '1rem 0',
- },
- projectIcon: {
- margin: '2rem 0',
- [theme.breakpoints.down('md')]: {
- margin: '0 0 0.25rem 0',
- width: '53px',
- },
- },
- subtitle: {
- marginBottom: '1rem',
- },
- emphazisedText: {
- fontSize: '1.5rem',
- marginBottom: '1rem',
- [theme.breakpoints.down('md')]: {
- fontSize: '1rem',
- marginBottom: '2rem',
- },
- },
- infoSection: {
- margin: '0',
- textAlign: 'center',
- marginBottom: '1rem',
- backgroundColor: theme.palette.background.paper,
- borderRadius: theme.shape.borderRadiusLarge,
+export const StyledDivContainer = styled('div')(({ theme }) => ({
+ ...flexRow,
+ width: '225px',
+ flexDirection: 'column',
+ boxShadow: 'none',
+ [theme.breakpoints.down('md')]: {
+ flexDirection: 'row',
+ alignItems: 'stretch',
width: '100%',
- padding: '1.5rem 1rem 1.5rem 1rem',
- [theme.breakpoints.down('md')]: {
- margin: '0 0.25rem',
- display: 'flex',
- flexDirection: 'column',
- alignItems: 'center',
- justifyContent: 'center',
- fontSize: '0.8rem',
- position: 'relative',
- padding: '0.8rem',
- '&:first-of-type': {
- marginLeft: '0',
- },
- '&:last-of-type': {
- marginRight: '0',
- },
+ marginBottom: theme.spacing(2),
+ },
+}));
+
+export const StyledDivPercentageContainer = styled('div')(({ theme }) => ({
+ display: 'flex',
+ justifyContent: 'center',
+ margin: theme.spacing(2, 0),
+}));
+
+export const StyledDivInfoContainer = styled('div')(({ theme }) => ({
+ margin: '0',
+ textAlign: 'center',
+ marginBottom: theme.spacing(2),
+ backgroundColor: theme.palette.background.paper,
+ borderRadius: theme.shape.borderRadiusLarge,
+ width: '100%',
+ padding: theme.spacing(3, 2, 3, 2),
+ [theme.breakpoints.down('md')]: {
+ margin: theme.spacing(0, 0.5),
+ ...flexRow,
+ flexDirection: 'column',
+ justifyContent: 'center',
+ fontSize: theme.fontSizes.smallBody,
+ position: 'relative',
+ padding: theme.spacing(1.5),
+ '&:first-of-type': {
+ marginLeft: '0',
},
- },
- arrowIcon: {
- color: '#635dc5',
- marginLeft: '0.5rem',
- },
- permissionButtonShortDesc: {
- transform: `translateY(-10px)`,
- },
- infoLink: {
- textDecoration: 'none',
- color: '#635dc5',
- [theme.breakpoints.down('md')]: {
- position: 'absolute',
- bottom: '5px',
- },
- },
- linkText: {
- [theme.breakpoints.down('md')]: {
- display: 'none',
+ '&:last-of-type': {
+ marginRight: '0',
},
},
}));
+
+export const StyledParagraphSubtitle = styled('p')(({ theme }) => ({
+ marginBottom: theme.spacing(2),
+}));
+
+export const StyledParagraphEmphasizedText = styled('p')(({ theme }) => ({
+ fontSize: '1.5rem',
+ marginBottom: theme.spacing(2),
+ [theme.breakpoints.down('md')]: {
+ fontSize: theme.fontSizes.bodySize,
+ marginBottom: theme.spacing(4),
+ },
+}));
+
+export const StyledSpanLinkText = styled('p')(({ theme }) => ({
+ [theme.breakpoints.down('md')]: {
+ display: 'none',
+ },
+}));
+
+export const StyledLink = styled(Link)(({ theme }) => ({
+ textDecoration: 'none',
+ ...flexRow,
+ justifyContent: 'center',
+ color: theme.palette.primary.main,
+ [theme.breakpoints.down('md')]: {
+ position: 'absolute',
+ bottom: theme.spacing(1.5),
+ },
+}));
+
+export const StyledArrowIcon = styled(ArrowForwardIcon)(({ theme }) => ({
+ color: theme.palette.primary.main,
+ marginLeft: theme.spacing(1),
+}));
diff --git a/frontend/src/component/project/Project/ProjectInfo/ProjectInfo.tsx b/frontend/src/component/project/Project/ProjectInfo/ProjectInfo.tsx
index c596784215..105f8f276d 100644
--- a/frontend/src/component/project/Project/ProjectInfo/ProjectInfo.tsx
+++ b/frontend/src/component/project/Project/ProjectInfo/ProjectInfo.tsx
@@ -1,14 +1,18 @@
-import { useStyles } from './ProjectInfo.styles';
-import { Link } from 'react-router-dom';
-import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
-import classnames from 'classnames';
-
-import { useThemeStyles } from 'themes/themeStyles';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import PercentageCircle from 'component/common/PercentageCircle/PercentageCircle';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { DEFAULT_PROJECT_ID } from '../../../../hooks/api/getters/useDefaultProject/useDefaultProjectId';
+import {
+ StyledDivContainer,
+ StyledDivInfoContainer,
+ StyledDivPercentageContainer,
+ StyledParagraphSubtitle,
+ StyledParagraphEmphasizedText,
+ StyledLink,
+ StyledSpanLinkText,
+ StyledArrowIcon,
+} from './ProjectInfo.styles';
interface IProjectInfoProps {
id: string;
@@ -19,8 +23,6 @@ interface IProjectInfoProps {
}
const ProjectInfo = ({ id, memberCount, health }: IProjectInfoProps) => {
- const { classes: themeStyles } = useThemeStyles();
- const { classes: styles } = useStyles();
const { uiConfig } = useUiConfig();
let link = `/admin/users`;
@@ -31,69 +33,44 @@ const ProjectInfo = ({ id, memberCount, health }: IProjectInfoProps) => {
return (
);
};
diff --git a/frontend/src/component/project/ProjectCard/ProjectCard.styles.ts b/frontend/src/component/project/ProjectCard/ProjectCard.styles.ts
index 38cccac9e5..9a7e9566a7 100644
--- a/frontend/src/component/project/ProjectCard/ProjectCard.styles.ts
+++ b/frontend/src/component/project/ProjectCard/ProjectCard.styles.ts
@@ -1,63 +1,76 @@
-import { makeStyles } from 'tss-react/mui';
+import { styled } from '@mui/material';
+import { Card, Box } from '@mui/material';
+import { Delete, Edit } from '@mui/icons-material';
+import { ReactComponent as ProjectIcon } from 'assets/icons/projectIcon.svg';
+import { flexRow } from 'themes/themeStyles';
-export const useStyles = makeStyles()(theme => ({
- projectCard: {
- padding: theme.spacing(1, 2, 2, 2),
- width: '220px',
- height: '204px',
- display: 'flex',
- flexDirection: 'column',
- justifyContent: 'space-between',
- margin: '0.5rem',
- boxShadow: 'none',
- border: '1px solid #efefef',
- [theme.breakpoints.down('sm')]: {
- justifyContent: 'center',
- },
- '&:hover': {
- transition: 'background-color 0.2s ease-in-out',
- backgroundColor: theme.palette.projectCard.hover,
- },
+export const StyledProjectCard = styled(Card)(({ theme }) => ({
+ padding: theme.spacing(1, 2, 2, 2),
+ width: '220px',
+ height: '204px',
+ display: 'flex',
+ flexDirection: 'column',
+ justifyContent: 'space-between',
+ margin: theme.spacing(1),
+ boxShadow: 'none',
+ border: `1px solid ${theme.palette.tertiary.contrast}`,
+ [theme.breakpoints.down('sm')]: {
+ justifyContent: 'center',
},
- header: {
- display: 'flex',
- alignItems: 'center',
- },
- title: {
- fontWeight: 'normal',
- fontSize: '1rem',
- lineClamp: 2,
- display: '-webkit-box',
- boxOrient: 'vertical',
- textOverflow: 'ellipsis',
- overflow: 'hidden',
- alignItems: 'flex-start',
- },
-
- projectIcon: {
- margin: '1rem auto',
- width: '80px',
- display: 'block',
- },
- info: {
- display: 'flex',
- justifyContent: 'space-between',
- fontSize: '0.8rem',
- },
- infoBox: {
- textAlign: 'center',
- },
- infoStats: {
- color: theme.palette.projectCard.textColor,
- fontWeight: 'bold',
- },
- actionsBtn: {
- transform: 'translateX(15px)',
- marginLeft: 'auto',
- marginRight: theme.spacing(1),
- },
- icon: {
- color: theme.palette.grey[700],
- marginRight: '0.5rem',
+ '&:hover': {
+ transition: 'background-color 0.2s ease-in-out',
+ backgroundColor: theme.palette.projectCard.hover,
},
}));
+
+export const StyledDivHeader = styled('div')(() => ({
+ ...flexRow,
+ width: '100%',
+}));
+
+export const StyledH2Title = styled('h2')(({ theme }) => ({
+ fontWeight: 'normal',
+ fontSize: theme.fontSizes.bodySize,
+ lineClamp: 2,
+ display: '-webkit-box',
+ boxOrient: 'vertical',
+ textOverflow: 'ellipsis',
+ overflow: 'hidden',
+ alignItems: 'flex-start',
+}));
+
+export const StyledBox = styled(Box)(() => ({
+ ...flexRow,
+ marginRight: 'auto',
+}));
+
+export const StyledEditIcon = styled(Edit)(({ theme }) => ({
+ color: theme.palette.neutral.main,
+ marginRight: theme.spacing(1),
+}));
+
+export const StyledDeleteIcon = styled(Delete)(({ theme }) => ({
+ color: theme.palette.neutral.main,
+ marginRight: theme.spacing(1),
+}));
+
+export const StyledProjectIcon = styled(ProjectIcon)(({ theme }) => ({
+ margin: theme.spacing(2, 'auto'),
+ width: '80px',
+ display: 'block',
+}));
+
+export const StyledDivInfo = styled('div')(({ theme }) => ({
+ display: 'flex',
+ justifyContent: 'space-between',
+ fontSize: theme.fontSizes.smallerBody,
+}));
+
+export const StyledDivInfoContainer = styled('div')(() => ({
+ textAlign: 'center',
+}));
+
+export const StyledParagraphInfo = styled('p')(({ theme }) => ({
+ color: theme.palette.projectCard.textColor,
+ fontWeight: 'bold',
+}));
diff --git a/frontend/src/component/project/ProjectCard/ProjectCard.tsx b/frontend/src/component/project/ProjectCard/ProjectCard.tsx
index a16ee83ebe..757ec92448 100644
--- a/frontend/src/component/project/ProjectCard/ProjectCard.tsx
+++ b/frontend/src/component/project/ProjectCard/ProjectCard.tsx
@@ -1,10 +1,7 @@
-import { Card, Menu, MenuItem } from '@mui/material';
-import { useStyles } from './ProjectCard.styles';
+import { Menu, MenuItem } from '@mui/material';
import MoreVertIcon from '@mui/icons-material/MoreVert';
-import { ReactComponent as ProjectIcon } from 'assets/icons/projectIcon.svg';
import React, { SyntheticEvent, useContext, useState } from 'react';
import { useNavigate } from 'react-router-dom';
-import { Delete, Edit } from '@mui/icons-material';
import { getProjectEditPath } from 'utils/routePathHelpers';
import PermissionIconButton from 'component/common/PermissionIconButton/PermissionIconButton';
import {
@@ -19,6 +16,20 @@ import { useFavoriteProjectsApi } from 'hooks/api/actions/useFavoriteProjectsApi
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { FavoriteIconButton } from 'component/common/FavoriteIconButton/FavoriteIconButton';
import { DeleteProjectDialogue } from '../Project/DeleteProject/DeleteProjectDialogue';
+import { styled } from '@mui/material';
+import { flexRow } from 'themes/themeStyles';
+import {
+ StyledProjectCard,
+ StyledDivHeader,
+ StyledBox,
+ StyledH2Title,
+ StyledEditIcon,
+ StyledDeleteIcon,
+ StyledProjectIcon,
+ StyledDivInfo,
+ StyledDivInfoContainer,
+ StyledParagraphInfo,
+} from './ProjectCard.styles';
interface IProjectCardProps {
name: string;
@@ -39,9 +50,8 @@ export const ProjectCard = ({
id,
isFavorite = false,
}: IProjectCardProps) => {
- const { classes } = useStyles();
const { hasAccess } = useContext(AccessContext);
- const { isOss, uiConfig } = useUiConfig();
+ const { isOss } = useUiConfig();
const [anchorEl, setAnchorEl] = useState(null);
const [showDelDialog, setShowDelDialog] = useState(false);
const navigate = useNavigate();
@@ -67,17 +77,20 @@ export const ProjectCard = ({
};
return (
-
-
-
-
{name}
+
+
+
+
+ {name}
+
@@ -110,7 +122,7 @@ export const ProjectCard = ({
navigate(getProjectEditPath(id));
}}
>
-
+
Edit project
-
+
-
-
-
+
+
+
{featureCount}
-
+
toggles
-
-
-
+
+
+
{health}%
-
+
health
-
+
-
+
+
{memberCount}
-
+
members
-
+
}
/>
-
+
-
+
);
};
diff --git a/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.styles.ts b/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.styles.ts
deleted file mode 100644
index f57a5da674..0000000000
--- a/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.styles.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { makeStyles } from 'tss-react/mui';
-
-export const useStyles = makeStyles()(theme => ({
- container: {
- display: 'flex',
- flexWrap: 'wrap',
- [theme.breakpoints.down('sm')]: {
- justifyContent: 'center',
- },
- },
- apiError: {
- maxWidth: '400px',
- marginBottom: '1rem',
- },
- cardLink: {
- color: 'inherit',
- textDecoration: 'none',
- border: 'none',
- padding: '0',
- background: 'transparent',
- fontFamily: theme.typography.fontFamily,
- pointer: 'cursor',
- },
-}));
diff --git a/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.tsx b/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.tsx
index 4f96ae429c..f1085f21ae 100644
--- a/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.tsx
+++ b/frontend/src/component/project/ProjectEnvironment/ProjectEnvironment.tsx
@@ -1,6 +1,5 @@
import { useMemo, useState } from 'react';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
-import { useStyles } from './ProjectEnvironment.styles';
import { PageContent } from 'component/common/PageContent/PageContent';
import { PageHeader } from 'component/common/PageHeader/PageHeader';
import { UPDATE_PROJECT } from 'component/providers/AccessProvider/permissions';
@@ -38,6 +37,19 @@ const StyledAlert = styled(Alert)(({ theme }) => ({
marginBottom: theme.spacing(4),
}));
+const StyledDivContainer = styled('div')(({ theme }) => ({
+ display: 'flex',
+ flexWrap: 'wrap',
+ [theme.breakpoints.down('sm')]: {
+ justifyContent: 'center',
+ },
+}));
+
+const StyledApiError = styled(ApiError)(({ theme }) => ({
+ maxWidth: '400px',
+ marginBottom: theme.spacing(2),
+}));
+
const ProjectEnvironmentList = () => {
const projectId = useRequiredPathParam('projectId');
const projectName = useProjectNameOrId(projectId);
@@ -56,7 +68,6 @@ const ProjectEnvironmentList = () => {
const [selectedEnvironment, setSelectedEnvironment] =
useState();
const [hideDialog, setHideDialog] = useState(false);
- const { classes: styles } = useStyles();
const { isOss } = useUiConfig();
const projectEnvironments = useMemo(
@@ -77,9 +88,8 @@ const ProjectEnvironmentList = () => {
const renderError = () => {
return (
-
);
@@ -229,7 +239,7 @@ const ProjectEnvironmentList = () => {
+
{
setOpen={setHideDialog}
onConfirm={onHideConfirm}
/>
-
+
}
elseShow={
diff --git a/frontend/src/component/project/ProjectList/ProjectList.styles.ts b/frontend/src/component/project/ProjectList/ProjectList.styles.ts
deleted file mode 100644
index f57a5da674..0000000000
--- a/frontend/src/component/project/ProjectList/ProjectList.styles.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { makeStyles } from 'tss-react/mui';
-
-export const useStyles = makeStyles()(theme => ({
- container: {
- display: 'flex',
- flexWrap: 'wrap',
- [theme.breakpoints.down('sm')]: {
- justifyContent: 'center',
- },
- },
- apiError: {
- maxWidth: '400px',
- marginBottom: '1rem',
- },
- cardLink: {
- color: 'inherit',
- textDecoration: 'none',
- border: 'none',
- padding: '0',
- background: 'transparent',
- fontFamily: theme.typography.fontFamily,
- pointer: 'cursor',
- },
-}));
diff --git a/frontend/src/component/project/ProjectList/ProjectList.tsx b/frontend/src/component/project/ProjectList/ProjectList.tsx
index 24232dea9d..032e0a479f 100644
--- a/frontend/src/component/project/ProjectList/ProjectList.tsx
+++ b/frontend/src/component/project/ProjectList/ProjectList.tsx
@@ -5,7 +5,6 @@ import { getProjectFetcher } from 'hooks/api/getters/useProject/getProjectFetche
import useProjects from 'hooks/api/getters/useProjects/useProjects';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { ProjectCard } from '../ProjectCard/ProjectCard';
-import { useStyles } from './ProjectList.styles';
import { IProjectCard } from 'interfaces/project';
import loadingData from './loadingData';
import { PageContent } from 'component/common/PageContent/PageContent';
@@ -17,7 +16,7 @@ import { Add } from '@mui/icons-material';
import ApiError from 'component/common/ApiError/ApiError';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { TablePlaceholder } from 'component/common/Table';
-import { useMediaQuery } from '@mui/material';
+import { useMediaQuery, styled } from '@mui/material';
import theme from 'themes/theme';
import { Search } from 'component/common/Search/Search';
import { PremiumFeature } from 'component/common/PremiumFeature/PremiumFeature';
@@ -25,6 +24,29 @@ import { ITooltipResolverProps } from 'component/common/TooltipResolver/TooltipR
import { ReactComponent as ProPlanIcon } from 'assets/icons/pro-enterprise-feature-badge.svg';
import { safeRegExp } from '@server/util/escape-regex';
+const StyledDivContainer = styled('div')(({ theme }) => ({
+ display: 'flex',
+ flexWrap: 'wrap',
+ [theme.breakpoints.down('sm')]: {
+ justifyContent: 'center',
+ },
+}));
+
+const StyledApiError = styled(ApiError)(({ theme }) => ({
+ maxWidth: '400px',
+ marginBottom: theme.spacing(2),
+}));
+
+const StyledCardLink = styled(Link)(({ theme }) => ({
+ color: 'inherit',
+ textDecoration: 'none',
+ border: 'none',
+ padding: '0',
+ background: 'transparent',
+ fontFamily: theme.typography.fontFamily,
+ pointer: 'cursor',
+}));
+
type PageQueryType = Partial>;
type projectMap = {
@@ -71,7 +93,6 @@ function resolveCreateButtonData(
export const ProjectListNew = () => {
const { hasAccess } = useContext(AccessContext);
const navigate = useNavigate();
- const { classes: styles } = useStyles();
const { projects, loading, error, refetch } = useProjects();
const [fetchedProjects, setFetchedProjects] = useState({});
const { isOss } = useUiConfig();
@@ -127,11 +148,7 @@ export const ProjectListNew = () => {
const renderError = () => {
return (
-
+
);
};
@@ -187,7 +204,7 @@ export const ProjectListNew = () => {
}
>
-
+
{
elseShow={() =>
filteredProjects.map(
(project: IProjectCard) => (
-
@@ -247,14 +263,14 @@ export const ProjectListNew = () => {
}
isFavorite={project.favorite}
/>
-
+
)
)
}
/>
}
/>
-
+
);
};
diff --git a/frontend/src/component/segments/SegmentDelete/SegmentDeleteConfirm/SegmentDeleteConfirm.styles.ts b/frontend/src/component/segments/SegmentDelete/SegmentDeleteConfirm/SegmentDeleteConfirm.styles.ts
deleted file mode 100644
index 8b4998c7c7..0000000000
--- a/frontend/src/component/segments/SegmentDelete/SegmentDeleteConfirm/SegmentDeleteConfirm.styles.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { makeStyles } from 'tss-react/mui';
-
-export const useStyles = makeStyles()(theme => ({
- deleteInput: {
- marginTop: '1rem',
- },
- link: {
- textDecoration: 'none',
- color: theme.palette.primary.main,
- fontWeight: theme.fontWeight.bold,
- },
-}));
diff --git a/frontend/src/component/segments/SegmentDelete/SegmentDeleteConfirm/SegmentDeleteConfirm.tsx b/frontend/src/component/segments/SegmentDelete/SegmentDeleteConfirm/SegmentDeleteConfirm.tsx
index 007f40ea1b..1f1b521e7e 100644
--- a/frontend/src/component/segments/SegmentDelete/SegmentDeleteConfirm/SegmentDeleteConfirm.tsx
+++ b/frontend/src/component/segments/SegmentDelete/SegmentDeleteConfirm/SegmentDeleteConfirm.tsx
@@ -1,9 +1,13 @@
import React, { useState } from 'react';
import { Dialogue } from 'component/common/Dialogue/Dialogue';
import Input from 'component/common/Input/Input';
-import { useStyles } from './SegmentDeleteConfirm.styles';
import { ISegment } from 'interfaces/segment';
import { SEGMENT_DIALOG_NAME_ID } from 'utils/testIds';
+import { styled } from '@mui/material';
+
+const StyledInput = styled(Input)(({ theme }) => ({
+ marginTop: theme.spacing(2),
+}));
interface ISegmentDeleteConfirmProps {
segment: ISegment;
@@ -18,7 +22,6 @@ export const SegmentDeleteConfirm = ({
onClose,
onRemove,
}: ISegmentDeleteConfirmProps) => {
- const { classes: styles } = useStyles();
const [confirmName, setConfirmName] = useState('');
const handleChange = (e: React.ChangeEvent) =>
@@ -49,12 +52,11 @@ export const SegmentDeleteConfirm = ({
diff --git a/frontend/src/component/segments/SegmentDelete/SegmentDeleteUsedSegment/SegmentDeleteUsedSegment.tsx b/frontend/src/component/segments/SegmentDelete/SegmentDeleteUsedSegment/SegmentDeleteUsedSegment.tsx
index bec57145d5..2bc996e378 100644
--- a/frontend/src/component/segments/SegmentDelete/SegmentDeleteUsedSegment/SegmentDeleteUsedSegment.tsx
+++ b/frontend/src/component/segments/SegmentDelete/SegmentDeleteUsedSegment/SegmentDeleteUsedSegment.tsx
@@ -1,5 +1,4 @@
import { Dialogue } from 'component/common/Dialogue/Dialogue';
-import { useStyles } from '../SegmentDeleteConfirm/SegmentDeleteConfirm.styles';
import { ISegment } from 'interfaces/segment';
import { IFeatureStrategy } from 'interfaces/strategy';
import { Link } from 'react-router-dom';
@@ -11,6 +10,12 @@ const StyledUl = styled('ul')({
marginBottom: 0,
});
+const StyledLink = styled(Link)(({ theme }) => ({
+ textDecoration: 'none',
+ color: theme.palette.primary.main,
+ fontWeight: theme.fontWeight.bold,
+}));
+
interface ISegmentDeleteUsedSegmentProps {
segment: ISegment;
open: boolean;
@@ -24,8 +29,6 @@ export const SegmentDeleteUsedSegment = ({
onClose,
strategies,
}: ISegmentDeleteUsedSegmentProps) => {
- const { classes: styles } = useStyles();
-
return (
{strategies?.map(strategy => (
-
{strategy.featureName!}{' '}
{formatStrategyNameParens(strategy)}
-
+
))}