Sha256: 6b6df3b464db7c81a5e3366ac0169106dabaec7ffccbb1a77f0cc2edc89073a1

Contents?: true

Size: 906 Bytes

Versions: 1

Compression:

Stored size: 906 Bytes

Contents

import React from 'react'
import classnames from 'classnames'
import { buildHtmlProps } from '../utilities/props'
import { globalProps, GlobalProps } from "../utilities/globalProps"
import DateStacked from '../pb_date_stacked/_date_stacked'

type TimelineDateAreaProps = {
  date?: Date,
  children?: React.ReactNode,
  className?: string,
  htmlOptions?: { [key: string]: any },
} & GlobalProps

const TimelineDateArea: React.FC<TimelineDateAreaProps> = ({
  date,
  children,
  className,
  htmlOptions = {},
  ...props
}) => {
  const htmlProps = buildHtmlProps(htmlOptions)
  return (
    <div
        {...htmlProps}
        className={classnames('pb_timeline_item_left_block', globalProps(props), className)}
    >
      {children}
      {date && (
        <DateStacked align="center"
            date={date}
            size="sm"
        />
      )}
    </div>
  )
}

export default TimelineDateArea

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
playbook_ui-14.5.0.pre.alpha.play1586datearea4115 app/pb_kits/playbook/pb_timeline/_date_area.tsx