@fortawesome/free-solid-svg-icons#faRoad JavaScript Examples

The following examples show how to use @fortawesome/free-solid-svg-icons#faRoad. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.js    From Webiu with MIT License 6 votes vote down vote up
Timeline = ({data, header, height}) =>  {
  const TimelineItem = ({ data }) => (
    <div className="timeline-item">
        <div className="timeline-item-content">
            <span className="tag" style={{ background: data.category.color }}>
                {data.category.tag}
            </span>
            <time><span className="data-time">{data.date}</span></time>
            <p className="data-text">{data.text}</p>
            {data.link && (
                <a
                    className="data-link"
                    href={data.link.url}
                    target="_blank"
                    rel="noopener noreferrer"
                >
                    {data.link.text}
                </a>
            )}
            <span className="circle" />
        </div>
    </div>
  );
  
  return (
    <div className="timeline-container"  style={{maxHeight: height}}>
            {header ? <div className="header-component">
                <h2 className="title"><FontAwesomeIcon className="icon-h2" icon={faRoad} /> {header}</h2>
            </div> : null}
            {data && data.map((data, idx) => (
                <TimelineItem data={data} key={idx} />
            ))}
    </div>
  );
}