Skip to content

Commit

Permalink
use listitemicon for images
Browse files Browse the repository at this point in the history
  • Loading branch information
VargaJoe committed Sep 27, 2023
1 parent 7f0aa9f commit 3b913dd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,20 @@ export const DefaultItemTemplate: React.FC<DefaultItemTemplateProps> = (props) =

if (repository?.schemas.isContentFromType<Image>(item, 'Image') && (!item.PageCount || item.PageCount <= 0)) {
return (

Check warning on line 67 in packages/sn-controls-react/src/fieldcontrols/reference-grid/default-item-template.tsx

View check run for this annotation

Codecov / codecov/patch

packages/sn-controls-react/src/fieldcontrols/reference-grid/default-item-template.tsx#L66-L67

Added lines #L66 - L67 were not covered by tests
<ListItemAvatar>
<ListItemIcon>
<img
data-test="reference-selection-image"
alt={item.DisplayName}
src={`${repository?.configuration.repositoryUrl}${item.Path}`}

Check warning on line 72 in packages/sn-controls-react/src/fieldcontrols/reference-grid/default-item-template.tsx

View check run for this annotation

Codecov / codecov/patch

packages/sn-controls-react/src/fieldcontrols/reference-grid/default-item-template.tsx#L72

Added line #L72 was not covered by tests
style={{ width: '3em', height: '3em', objectFit: 'scale-down' }}
/>
</ListItemAvatar>
</ListItemIcon>
)
}

if (repository?.schemas.isContentFromType<Image>(item, 'Image') && item.PageCount && item.PageCount > 0) {
return (

Check warning on line 80 in packages/sn-controls-react/src/fieldcontrols/reference-grid/default-item-template.tsx

View check run for this annotation

Codecov / codecov/patch

packages/sn-controls-react/src/fieldcontrols/reference-grid/default-item-template.tsx#L79-L80

Added lines #L79 - L80 were not covered by tests
<ListItemAvatar>
<ListItemIcon>
<img
data-test="reference-selection-image"
alt={item.DisplayName}
Expand All @@ -91,7 +91,7 @@ export const DefaultItemTemplate: React.FC<DefaultItemTemplateProps> = (props) =
)}
style={{ width: '3em', height: '3em', objectFit: 'scale-down' }}
/>
</ListItemAvatar>
</ListItemIcon>
)
}

Expand Down

0 comments on commit 3b913dd

Please sign in to comment.