Extract list card content

This commit is contained in:
schroda
2025-04-25 01:05:43 +02:00
parent c0ab5f93a1
commit 1b7338f5e3
7 changed files with 42 additions and 60 deletions

View File

@@ -8,7 +8,6 @@
import { useEffect, useState } from 'react';
import Card from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import { useTranslation } from 'react-i18next';
@@ -35,6 +34,7 @@ import { getInstalledState } from '@/modules/extension/Extensions.utils.ts';
import { getErrorMessage } from '@/lib/HelperFunctions.ts';
import { CustomTooltip } from '@/modules/core/components/CustomTooltip';
import { ListCardAvatar } from '@/modules/core/components/cards/list/ListCardAvatar.tsx';
import { ListCardContent } from '@/modules/core/components/cards/list/ListCardContent.tsx';
interface IProps {
extension: TExtension;
@@ -118,17 +118,7 @@ export function ExtensionCard(props: IProps) {
return (
<Card>
<CardContent
sx={{
display: 'flex',
alignItems: 'center',
gap: 1,
p: 1.5,
'&:last-child': {
paddingBottom: 1.5,
},
}}
>
<ListCardContent>
<ListCardAvatar iconUrl={requestManager.getValidImgUrlFor(iconUrl)} alt={name} />
<Stack
sx={{
@@ -168,7 +158,7 @@ export function ExtensionCard(props: IProps) {
>
{t(INSTALLED_STATE_TO_TRANSLATION_KEY_MAP[installedState])}
</Button>
</CardContent>
</ListCardContent>
</Card>
);
}