Sha256: bd3381a39d5b47906df3028d54a747944fc7f5356440db6f168cd1e93723da51

Contents?: true

Size: 1.09 KB

Versions: 1825

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,825 entries across 1,825 versions & 2 rubygems

Version Path
playbook_ui-12.20.0.pre.alpha.title2667 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.20.0.pre.alpha.title2665 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.20.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.19.0.pre.alpha.PLAY699zindexresponsive650 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui_docs-12.19.0.pre.alpha.movemarkdown639 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.19.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown638 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts632 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.19.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown629 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown628 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.play786multilevelselectimprovements627 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown626 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY603datepickerquickpickinputpresetdropdown617 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY735mobileheadersfix616 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.play786multilevelselectimprovements613 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY747carddarktokens610 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts608 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0.pre.alpha.PLAY785typeaheadts607 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.18.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
playbook_ui-12.17.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx