From e6f2a152569d52c9d97849010b3d9f36806b5c0b Mon Sep 17 00:00:00 2001 From: henrikmv <110386561+henrikmv@users.noreply.github.com> Date: Sun, 11 Aug 2024 12:56:39 +0200 Subject: [PATCH] refactor: [DHIS2-17652] Replace Material-UI Avatar (#3719) --- .../CardList/CardListItem.component.js | 10 ++-- .../CardImage/CardImage.component.js | 56 +++++++++++++++++++ 2 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 src/core_modules/capture-ui/CardImage/CardImage.component.js diff --git a/src/core_modules/capture-core/components/CardList/CardListItem.component.js b/src/core_modules/capture-core/components/CardList/CardListItem.component.js index 617e7699d3..a1fe4bc5d1 100644 --- a/src/core_modules/capture-core/components/CardList/CardListItem.component.js +++ b/src/core_modules/capture-core/components/CardList/CardListItem.component.js @@ -3,9 +3,10 @@ import i18n from '@dhis2/d2-i18n'; import React from 'react'; import moment from 'moment'; import type { ComponentType } from 'react'; -import { Avatar, Grid, withStyles } from '@material-ui/core'; +import { Grid, withStyles } from '@material-ui/core'; import { colors, Tag, IconCheckmark16, Tooltip } from '@dhis2/ui'; import { useTimeZoneConversion } from '@dhis2/app-runtime'; +import { CardImage } from '../../../capture-ui/CardImage/CardImage.component'; import type { CardDataElementsInformation, CardProfileImageElementInformation, @@ -63,8 +64,8 @@ const getStyles = (theme: Theme) => ({ flexGrow: 1, }, image: { - width: theme.typography.pxToRem(44), - height: theme.typography.pxToRem(44), + width: theme.typography.pxToRem(54), + height: theme.typography.pxToRem(54), marginRight: theme.typography.pxToRem(8), }, buttonMargin: { @@ -151,7 +152,8 @@ const CardListItemIndex = ({ const imageValue = item.values[imageElement.id]; return (