APMG / apm-titan

A number of React components that can be used as a starting point to create APM websites
MIT License
0 stars 0 forks source link

Create new <Time> component, remove date-fns from most other components #25

Closed mattaho closed 5 years ago

mattaho commented 5 years ago

The intent of this is to be able to pass in anything as the pubDate prop for components that need one, so that the pubdate can be formatted however we need. In addition to this I created a <Time> component to handle formatting dates/times more easily.

This means that when using, for example, a Teaser component, we should pass in the <Time> component as the pubDate prop, like:

<Teaser pubDate={<Time dateTime={story.pubdate} />} />