import React from 'react';
import {Link} from 'react-router'
import Time from 'trc-client-core/src/components/Time';

export default function NewsListItem(props) {
    var to = `/media/news/${props.title}`;
    return <li className="NewsList_item" key={props.title}>
        <Link to={to}>
            <Time className="NewsList_date" value={props.date} format="MMM DD"/>
            {props.title}
        </Link>
        {(props.lead) ? <Link to={to} className="NewsList_item_lead">{props.lead}</Link> : null}
    </li>;
}