Sha256: 7954071f07ab65261fbf636b921e3916059111a6c0dbde93bdfe8384802c89f7

Contents?: true

Size: 1005 Bytes

Versions: 239

Compression:

Stored size: 1005 Bytes

Contents

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

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

import TimelineItem from './_item'

type TimelineProps = {
  aria?: { [key: string]: string },
  children?: React.ReactChild[] | React.ReactChild,
  className?: string,
  data?: { [key: string]: string },
  id?: string,
  orientation?: string,
  showDate?: boolean,
}

const Timeline = ({
  aria = {},
  className,
  children,
  data = {},
  id,
  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)}
      id={id}
    >
      {children}
    </div>
  )
}

Timeline.Item = TimelineItem

export default Timeline

Version data entries

239 entries across 239 versions & 1 rubygems

Version Path
playbook_ui-13.11.1.pre.alpha.play900startratingasinput1530 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.12.0 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.11.1 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.11.0 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.PLAY1051removinghighchartsdependency1465 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.webpackerregistercomponents1463 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.dependabotnpmandyarnfortawesomefontawesomepro6421439 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.play10561428 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.play1054tableheadersortconsolidation1416 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.play10561409 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.dependabotnpmandyarntiptapextensionlink21121407 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.PLAY1046multilevelsingleselectphase21365 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.PLAY1046multilevelsingleselectphase21358 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.play10481357 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.play845addswiftkitspage1332 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.PLAY978alphatesthighcharts41330 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.PLAY1046multilevelsingleselectphase21328 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.PLAY1046multilevelsingleselectphase21323 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0.pre.alpha.play978makehighchartsadevdependencypoc1322 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.10.0 app/pb_kits/playbook/pb_timeline/_timeline.tsx