Sha256: c7f93002b2d1d9b1dd68778a65eeacf5dd2314334b81002068679b9335cbc585

Contents?: true

Size: 1.16 KB

Versions: 128

Compression:

Stored size: 1.16 KB

Contents

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

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

import TimelineItem from './_item'

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

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

Timeline.Item = TimelineItem

export default Timeline

Version data entries

128 entries across 128 versions & 1 rubygems

Version Path
playbook_ui-13.21.0.pre.alpha.PBNTR243globalpositioningpropinset2504 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.PLAY12652489 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.PLAY12582474 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.PBNTR224letuserresetrowexpansion2466 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.PLAY120322465 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.pbntr220improveexpansionspeed2451 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.PBNTR224letuserresetrowexpansion2441 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.PBNTR238DatePickerYearBug2436 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.pbntr220improveexpansionspeed2431 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0.pre.alpha.pbntr220improveexpansionspeed2415 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.20.0.pre.alpha.play1247htmloptions2404 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.20.0.pre.alpha.play1247htmloptions2403 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.20.0.pre.alpha.PLAY12572402 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.21.0 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.20.0.pre.alpha.PBNTR225advancedtablefeedback2375 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.19.0.pre.alpha.PBNTR200addadvancedtablekitdarkmodestyles2346 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2345 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.19.0.pre.alpha.play1174fixconfimationtoastmobilebug2342 app/pb_kits/playbook/pb_timeline/_timeline.tsx
playbook_ui-13.19.0.pre.alpha.play1186collapsiblenaviconcolorbug2321 app/pb_kits/playbook/pb_timeline/_timeline.tsx