react-icons/fa#FaRegCalendarAlt JavaScript Examples

The following examples show how to use react-icons/fa#FaRegCalendarAlt. 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: post.js    From gatsby-starter-breeze with MIT License 6 votes vote down vote up
Post = ({ post }) => {
  return (
    <article>
      <header className={styles["header"]}>
        {post.frontmatter.image && (
          <div
            className={styles["header__image"]}
            style={{ backgroundImage: `url(${post.frontmatter.image})` }}
          ></div>
        )}
        <div className={styles["header__info"]}>
          <h1 className={styles["header__info__title"]}>
            {post.frontmatter.title}
          </h1>
          <span className={styles["header__info__date"]}>
            <FaRegCalendarAlt className={styles["icon"]} />
            {post.fields.date}
          </span>
          {post.frontmatter.tags && (
            <span className={styles["header__info__tags"]}>
              <FaTags className={styles["icon"]} />
              <ol>
                {post.frontmatter.tags.map(tag => (
                  <li key={tag}>
                    <Link to={`/tags/${_.kebabCase(tag)}/`}>{tag}</Link>
                  </li>
                ))}
              </ol>
            </span>
          )}
        </div>
      </header>
      <section
        className={styles["content"]}
        dangerouslySetInnerHTML={{ __html: post.html }}
      />
    </article>
  )
}