Skip to content

Instantly share code, notes, and snippets.

@Harasz
Created September 1, 2021 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Harasz/e73928ab240a4ac58f9135c44a2b08f1 to your computer and use it in GitHub Desktop.
Save Harasz/e73928ab240a4ac58f9135c44a2b08f1 to your computer and use it in GitHub Desktop.
<ResourceList
resourceName={{ singular: "product", plural: "products" }}
items={[settingsObj]}
renderItem={(item) => {
const { id, title, image } = item;
return (
<ResourceItem
id={id}
media={
<Thumbnail
size="small"
source={image?.src || ImageMajor}
alt={`Product ${title} thumbnail`}
/>
}
name={title}
verticalAlignment="center"
>
<h3>
<TextStyle variation="strong">{title}</TextStyle>
</h3>
</ResourceItem>
);
}}
/>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment