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.0.1.alpha.railscusticon app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.0.2.pre.alpha.pre.iconfix app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.0.1.alpha.rtflexfix app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.0.0.pre.alphafonts app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.0.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-10.0.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.19.0.pre.alpha.pre.fonts2 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.19.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.18.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.17.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.16.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.15.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.14.1 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
playbook_ui-9.13.0 app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx