import * as React from 'react';

import {
    DocumentCard,
    DocumentCardTitle,
    DocumentCardPreview,
    IDocumentCardPreviewProps
  } from 'office-ui-fabric-react/lib/DocumentCard';

  import './index.css';

export class DashboardCard extends React.Component<any, any> {

    public render(): JSX.Element{
        
        const previewPropsUsingIcon: IDocumentCardPreviewProps = {
            previewImages: [
            {
                previewIconProps: { iconName: this.props.icon, className: this.props.icon,styles: { root: { fontSize: 32, lineHeight: 47, color: '#576a3d' },  } },
                height: 50,
                
            },
            
            ]
        };
        
        return <DocumentCard className="dashboard-Card" onClickHref={this.props.onClickHref}>
                    <DocumentCardPreview {...previewPropsUsingIcon} />
                    <div className="ms-ConversationTile-TitlePreviewArea">
                    <DocumentCardTitle
                        title={this.props.title}
                        shouldTruncate={true}
                    />
                    <DocumentCardTitle
                        title={this.props.subTitle}
                        shouldTruncate={true}
                    />
                    </div>
                </DocumentCard>
    }
}

export default DashboardCard;