Sha256: c7db567eaaaea15a9dead0251a035aed95583dfda9d9df6587dfb35b92620be1

Contents?: true

Size: 956 Bytes

Versions: 216

Compression:

Stored size: 956 Bytes

Contents

/* @flow */

import React from 'react'
import classnames from 'classnames'

import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'

import TimelineItem from './_item.jsx'

type TimelineProps = {
  aria?: object,
  children?: array<React.ReactChild>,
  className?: string,
  data?: string,
  id?: string,
  orientation?: string,
  showDate?: boolean,
}

const Timeline = ({
  aria = {},
  className,
  children,
  data = {},
  orientation = 'horizontal',
  showDate = false,
}: TimelineProps) => {
  const ariaProps = buildAriaProps(aria)
  const dataProps = buildDataProps(data)
  const dateStyle = showDate === true ? '_with_date' : ''
  const timelineCss = buildCss('pb_timeline_kit', `_${orientation}`, dateStyle)
  return (
    <div
        {...ariaProps}
        {...dataProps}
        className={classnames(timelineCss, className)}
    >
      {children}
    </div>
  )
}

Timeline.Item = TimelineItem

export default Timeline

Version data entries

216 entries across 216 versions & 1 rubygems

Version Path
playbook_ui-10.5.0 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.4.0 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.3.0 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.2.1.alpha.sisensefix app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.2.1 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.2.0 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.1.0 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.0.3.pre.alpha.walkthrough2 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.0.3.pre.alpha.walkthrough app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.0.1.alpha.railscusticon app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.0.2.pre.alpha.pre.iconfix app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.0.1.alpha.rtflexfix app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.0.0.pre.alphafonts app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.0.1 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-10.0.0 app/pb_kits/playbook/pb_timeline/_timeline.jsx
playbook_ui-9.19.0.pre.alpha.pre.fonts2 app/pb_kits/playbook/pb_timeline/_timeline.jsx