Hi I am new to SPFX and react JS , i like to create Tiles webpart from sharepoint list where it will render all properties of tiles from list like icon, colour,text,
I had tried using office fabric ui and tried to create document card, I want to add Sharepoint list properties to this document card currently its static value
import * as React from 'react';
import {
DocumentCard,
DocumentCardActivity,
DocumentCardPreview,
DocumentCardTitle,
IDocumentCardPreviewProps
} from 'office-ui-fabric-react/lib/DocumentCard';
import { ImageFit } from 'office-ui-fabric-react/lib/Image';
import { TestImages } from '../../../common/TestImages';
export class DocumentCardBasicExample extends React.PureComponent {
public render(): JSX.Element {
const previewProps: IDocumentCardPreviewProps = {
previewImages: [
{
name: 'Revenue stream proposal fiscal year 2016 version02.pptx',
linkProps: {
href: 'http://bing.com',
target: '_blank'
},
previewImageSrc: TestImages.documentPreview,
iconSrc: TestImages.iconPpt,
imageFit: ImageFit.cover,
width: 318,
height: 196
}
]
};
return (
<DocumentCard onClickHref="http://bing.com">
<DocumentCardPreview {...previewProps} />
<DocumentCardTitle
title="Large_file_name_with_underscores_used_to_separate_all_of_the_words_and_there_are_so_many_words_it_needs_truncating.pptx"
shouldTruncate={true}
/>
<DocumentCardActivity
activity="Created a few minutes ago"
people={[{ name: 'Annie Lindqvist', profileImageSrc: TestImages.personaFemale }]}
/>
</DocumentCard>
);
}
}