Sha256: bd3381a39d5b47906df3028d54a747944fc7f5356440db6f168cd1e93723da51

Contents?: true

Size: 1.09 KB

Versions: 1766

Compression:

Stored size: 1.09 KB

Contents

import React from 'react'
import Timestamp from '../_timestamp'

const todaysDate = new Date()
const futureYear = new Date().getFullYear() + 4
const pastYear = new Date().getFullYear() - 1
const month = new Date().getMonth()
const date = new Date().getDate()
const hours = new Date().getHours()
const minutes = new Date().getMinutes()
const futureDate = new Date(futureYear, month, date, hours, minutes)
const pastDate = new Date(pastYear, month, date, hours, minutes)

const TimestampDefault = (props) => {
  return (
    <div>
      <Timestamp
          align="left"
          showDate={false}
          timestamp={todaysDate}
          {...props}
      />

      <br />

      <Timestamp
          align="left"
          showDate
          timestamp={todaysDate}
          {...props}
      />

      <br />

      <Timestamp
          align="left"
          showDate
          timestamp={futureDate}
          {...props}
      />

      <br />

      <Timestamp
          align="left"
          showDate
          timestamp={pastDate}
          {...props}
      />
    </div>
  )
}

export default TimestampDefault

Version data entries

1,766 entries across 1,766 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx