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-8.2.0.pre.alpha1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-8.1.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-8.0.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-8.0.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-8.0.0.pre.alpha5 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-8.0.0.pre.alpha4 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-8.0.0.pre.alpha1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.16.0.pre.alpha5 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.16.0.pre.alpha4 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.16.0.pre.alpha3 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.16.0.pre.alpha2 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.16.0.pre.alpha1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.14.0.pre.alpha1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.16.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.15.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-7.15.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx