Skip to content

Commit

Permalink
fix: vertically align file type icon on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Mar 25, 2024
1 parent 566685f commit 843d7cb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sharedData/components/SharedDataEntryBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux';
import DeleteIcon from '@mui/icons-material/Delete';
import { Grid, ListItem, Stack, Typography } from '@mui/material';
import useMediaQuery from '@mui/material/useMediaQuery';

import { daysSince } from 'timeUtils';

Expand Down Expand Up @@ -69,6 +70,7 @@ const SharedDataEntryBase = props => {
);
const dispatch = useDispatch();
const { trackEvent } = useAnalytics();
const isSmall = useMediaQuery(theme.breakpoints.down('sm'));

const onConfirm = useCallback(() => {
dispatch(deleteSharedData({ dataEntry, sharedResource })).then(data => {
Expand Down Expand Up @@ -182,7 +184,10 @@ const SharedDataEntryBase = props => {
order={{ xs: 2, md: 2 }}
component={StackRow}
>
<EntryTypeIcon resourceType={dataEntry.resourceType} />
<EntryTypeIcon
resourceType={dataEntry.resourceType}
style={isSmall ? { marginTop: '-1em', paddingRight: '5px' } : {}}
/>
<Restricted
permission="sharedData.edit"
resource={permissionsResource}
Expand Down

0 comments on commit 843d7cb

Please sign in to comment.