Hylozoic / hylo-evo

Hylo UI
Apache License 2.0
36 stars 10 forks source link

Tooltip on post and comment created timestamp that shows the exact timestamp #1628

Open tibetsprague opened 2 months ago

tibetsprague commented 2 months ago

Right now our timestamps are displayed like "1 week ago", which doesnt tell you exactly when a post or comment was posted. Sometimes you want to see this. Next Economy MBA has requested it. For now lets just add a tooltip to the existing timestamp that shows the exact time the comment or post was posted. Something like "Mar 15 at 2:45pm"

tibetsprague commented 2 weeks ago

@KevinTriplett this should be an easy one to add alongside the "edited" label

tibetsprague commented 2 weeks ago

import Tooltip from 'components/Tooltip' then in the component somewhere something like


<Tooltip
          delay={550}
          id='dateTip'
          position='left'
        />

then on the element you want to add the tooltip to add attributes like this:

data-for='dateTip'
data-tip={formattedTimestamp}