Sha256: 97e3d9c3ae50743ec75b89a1cc47d9210fa5dfc6ca371be92b6b25ec9c61c9d4

Contents?: true

Size: 1.69 KB

Versions: 116

Compression:

Stored size: 1.69 KB

Contents

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

const todaysDate = new Date()
const year = new Date().getFullYear() + 4
const month = new Date().getMonth()
const date = new Date().getDate()
const hours = new Date().getHours()
const minutes = new Date().getMinutes()
const customDate = new Date(year, month, date, hours, minutes)

const TimestampAlign = (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={customDate}
          {...props}
      />

      <br />
      <br />

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

      <br />

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

      <br />

      <Timestamp
          align="center"
          showDate
          timestamp={customDate}
          {...props}
      />

      <br />
      <br />

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

      <br />

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

      <br />

      <Timestamp
          align="right"
          showDate
          timestamp={customDate}
          {...props}
      />
    </div>
  )
}

export default TimestampAlign

Version data entries

116 entries across 116 versions & 1 rubygems

Version Path
playbook_ui-10.11.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.10.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.9.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.8.1.pre.alpha.flexdeps app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.9.0.pre.alpha1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.8.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.7.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.7.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.6.2.pre.alpha.dep app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.6.1.pre.alpha1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.6.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.5.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.4.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.3.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.2.1.alpha.sisensefix app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.2.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.2.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.1.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.0.3.pre.alpha.walkthrough2 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.0.3.pre.alpha.walkthrough app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx